Pawn.cpp: fixed effect iterator BAD_ACCESS
Erasure was occurring before the iterator increased, causing a bad access. Solved by storing map pairs in variables and manually updating iterator before erasure. Fixed mix-up in function arguments on food poisoning
This commit is contained in:
@@ -570,7 +570,7 @@ bool cPlayer::Feed(int a_Food, double a_Saturation)
|
||||
|
||||
void cPlayer::FoodPoison(int a_NumTicks)
|
||||
{
|
||||
AddEntityEffect(cEntityEffect::efHunger, cEntityEffect(0, a_NumTicks, NULL));
|
||||
AddEntityEffect(cEntityEffect::efHunger, cEntityEffect(a_NumTicks, 0, NULL));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user