File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39390,15 +39390,25 @@ void player_die()
3939039390 player[playerindex].spawnhealth = self->modeldata.health;
3939139391 player[playerindex].spawnmp = self->modeldata.mp;
3939239392
39393- if(self->modeldata.death_config_flags & ~(DEATH_CONFIG_REMOVE_CORPSE_AIR | DEATH_CONFIG_REMOVE_CORPSE_GROUND))
39394- {
39395- kill_entity(self, KILL_ENTITY_TRIGGER_PLAYER_DEATH);
39396- }
39397- else
39398- {
39393+ /*
39394+ * Handle the body. If any corpse flags
39395+ * are set, we leave entity on screen
39396+ * and make it inert. Otherwise we can
39397+ * just run kill function to remove.
39398+ *
39399+ * REMOVE_CORPSE_* flags refer to how
39400+ * the live entity is removed from the
39401+ * game while leaving a corpse behind.
39402+ */
39403+
39404+ const e_death_config_flags leave_corpse = DEATH_CONFIG_REMOVE_CORPSE_AIR | DEATH_CONFIG_REMOVE_CORPSE_GROUND;
39405+
39406+ if (self->modeldata.death_config_flags & leave_corpse) {
3939939407 self->think = NULL;
3940039408 self->takeaction = NULL;
39401- self->death_state |= DEATH_STATE_CORPSE;
39409+ self->death_state |= DEATH_STATE_CORPSE;
39410+ } else {
39411+ kill_entity(self, KILL_ENTITY_TRIGGER_PLAYER_DEATH);
3940239412 }
3940339413
3940439414 if(player[playerindex].lives <= 0)
You can’t perform that action at this time.
0 commit comments