Skip to content

Commit cc3bad6

Browse files
committed
KillCharacter() is evil from within CCharacter because it deletes this
Thats how you get nasty bugs
1 parent dfdd577 commit cc3bad6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/server/ddnet_callback_ctx.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ void CDDNetCallbackCtx::Die()
2626
if(!pPlayer)
2727
return;
2828

29-
pPlayer->KillCharacter(WEAPON_SELF);
29+
if(pPlayer->GetCharacter())
30+
pPlayer->GetCharacter()->Die(pPlayer->GetCid(), WEAPON_SELF);
3031
}
3132

3233
void CDDNetCallbackCtx::Emote(int Emoticon)

0 commit comments

Comments
 (0)