void forcewall_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf) { V_Touch(self, other, plane, surf); // let teammates pass thru if (/*(other != self->activator) &&*/ G_EntIsAlive(other)) { if (OnSameTeam(self->activator, other) && (other->movetype == MOVETYPE_STEP || other->movetype == MOVETYPE_WALK)) { //gi.dprintf("%s touching %d \n",other->classname, other->movetype); self->solid = SOLID_NOT; self->wait = level.time + 0.2; // small buffer so monsters can get thru } else if (level.time > self->random) { // dont allow solid force wall to trap people if (level.framenum == self->count-900) { G_FreeEdict(self); return; } forcewall_knockback(self, other); // knock them back gi.sound(other, CHAN_ITEM, gi.soundindex("world/force2.wav"), 1, ATTN_NORM, 0); self->random = level.time + 0.5; // dont spam the sound } } }
void minisentry_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf) { V_Touch(self, other, plane, surf); //4.2 if this is a player-monster (morph), then we should be looking at the client/player if (PM_MonsterHasPilot(other)) other = other->activator; if (other && other->inuse && (other == self->creator) && (level.time > self->random)) { safe_cprintf(self->creator, PRINT_HIGH, "Rotating sentry gun 45 degrees.\n"); VectorCopy(self->move_angles, self->s.angles); // reset angles to default self->s.angles[YAW]+=45; ValidateAngles(self->s.angles); VectorCopy(self->s.angles, self->move_angles); // update default angles self->random = level.time + 1; self->nextthink = level.time + 2; } }
void depot_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf) { V_Touch(ent, other, plane, surf); depot_give_inventory(ent, other); }
void totem_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf) { V_Touch(self, other, plane, surf); }