void TRIGGER::tick() { if (server_tick() % 10 == 0) { if (hit_character()) open_door(server_tick()); } return; }
void PLASMA::tick() { if (lifetime==0) { game.world.destroy_entity(this); return; } move(); hit_character(); lifetime--; int res = col_intersect_nolaser(pos, pos+core,0, 0); if(res) { game.create_explosion(pos, -1, WEAPON_GRENADE, false); game.world.destroy_entity(this); } }