From: Mario Date: Thu, 10 Dec 2015 21:10:29 +0000 (+1000) Subject: Add a check to make sure it can't crash (though, something to make sure player actual... X-Git-Tag: xonotic-v0.8.2~1520 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=500679555f44bf4dd8f9b1ba00e470a2046e1d30;p=xonotic%2Fxonotic-data.pk3dir.git Add a check to make sure it can't crash (though, something to make sure player actually dies may be needed) --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 89cb27185..df1b6446f 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1588,7 +1588,8 @@ void player_regen () { if(self.vehicle) vehicles_exit(VHEF_RELEASE); - self.event_damage(self, self, 1, DEATH_ROT.m_id, self.origin, '0 0 0'); + if(self.event_damage) + self.event_damage(self, self, 1, DEATH_ROT.m_id, self.origin, '0 0 0'); } if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))