mirror of
https://github.com/blendogames/thirtyflightsofloving.git
synced 2025-01-30 04:00:40 +00:00
Implemented entity class IDs in missionpack DLL.
This commit is contained in:
parent
b8ea025d01
commit
bc74e8dbc2
82 changed files with 1433 additions and 833 deletions
|
@ -211,6 +211,7 @@ void Tag_DropToken (edict_t *ent, gitem_t *item)
|
|||
|
||||
// tag_token->classname = item->classname;
|
||||
tag_token->classname = "dm_tag_token"; // Knightmare- classname of the tag token item is NULL!
|
||||
tag_token->class_id = ENTITY_TAGTOKEN;
|
||||
tag_token->item = item;
|
||||
tag_token->spawnflags = DROPPED_ITEM;
|
||||
tag_token->s.effects = EF_ROTATE | EF_TAGTRAIL;
|
||||
|
@ -324,6 +325,7 @@ void SP_dm_tag_token (edict_t *self)
|
|||
tag_count = 0;
|
||||
|
||||
self->classname = "dm_tag_token";
|
||||
self->class_id = ENTITY_TAGTOKEN;
|
||||
self->model = "models/items/tagtoken/tris.md2";
|
||||
self->count = 1;
|
||||
SpawnItem (self, FindItem ("Tag Token"));
|
||||
|
|
|
@ -122,6 +122,7 @@ void camera_on (edict_t *ent)
|
|||
faker->viewheight = ent->viewheight;
|
||||
faker->inuse = true;
|
||||
faker->classname = "camplayer";
|
||||
faker->class_id = ENTITY_CAMPLAYER;
|
||||
faker->mass = ent->mass;
|
||||
faker->solid = SOLID_BBOX;
|
||||
faker->deadflag = DEAD_NO;
|
||||
|
@ -196,12 +197,14 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
|
|||
|
||||
next = G_Find(NULL,FOFS(targetname),monitor->target);
|
||||
if (!next) return NULL;
|
||||
if (!next->count) {
|
||||
if (!next->count)
|
||||
{
|
||||
|
||||
if (camera) {
|
||||
next = camera;
|
||||
next++;
|
||||
} else
|
||||
}
|
||||
else
|
||||
next = g_edicts;
|
||||
|
||||
for ( ; next < &g_edicts[globals.num_edicts] ; next++)
|
||||
|
@ -238,7 +241,9 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
|
|||
if (!Q_stricmp (next->targetname, monitor->target))
|
||||
goto found_one;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
int which, start;
|
||||
|
||||
if (camera) {
|
||||
|
@ -249,9 +254,12 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
|
|||
which = 1;
|
||||
start = which;
|
||||
next = g_edicts+1;
|
||||
while (1) {
|
||||
if (next->targetname) {
|
||||
if (!Q_stricmp(next->targetname,monitor->target)) {
|
||||
while (1)
|
||||
{
|
||||
if (next->targetname)
|
||||
{
|
||||
if (!Q_stricmp(next->targetname,monitor->target))
|
||||
{
|
||||
if (next->count == which) {
|
||||
if (!next->inuse || (next->deadflag == DEAD_DEAD) ||
|
||||
(!Q_stricmp (next->classname,"turret_breach") && (next->spawnflags & 16)) )
|
||||
|
@ -337,10 +345,14 @@ edict_t *G_FindPrevCamera (edict_t *camera, edict_t *monitor)
|
|||
which = monitor->count;
|
||||
start = which;
|
||||
prev = g_edicts+1;
|
||||
while (1) {
|
||||
if (prev->targetname) {
|
||||
if (!Q_stricmp(prev->targetname,monitor->target)) {
|
||||
if (prev->count == which) {
|
||||
while (1)
|
||||
{
|
||||
if (prev->targetname)
|
||||
{
|
||||
if (!Q_stricmp(prev->targetname,monitor->target))
|
||||
{
|
||||
if (prev->count == which)
|
||||
{
|
||||
if (!prev->inuse || (prev->deadflag == DEAD_DEAD) ||
|
||||
(!Q_stricmp (prev->classname,"turret_breach") && (prev->spawnflags & 16)))
|
||||
{
|
||||
|
|
|
@ -12,7 +12,8 @@ void UpdateChaseCam(edict_t *ent)
|
|||
|
||||
// is our chase target gone?
|
||||
if (!ent->client->chase_target->inuse
|
||||
|| ent->client->chase_target->client->resp.spectator) {
|
||||
|| ent->client->chase_target->client->resp.spectator)
|
||||
{
|
||||
edict_t *old = ent->client->chase_target;
|
||||
ChaseNext(ent);
|
||||
if (ent->client->chase_target == old) {
|
||||
|
@ -79,7 +80,8 @@ void UpdateChaseCam(edict_t *ent)
|
|||
ent->client->ps.viewangles[ROLL] = 40;
|
||||
ent->client->ps.viewangles[PITCH] = -15;
|
||||
ent->client->ps.viewangles[YAW] = targ->client->killer_yaw;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
VectorCopy(targ->client->v_angle, ent->client->ps.viewangles);
|
||||
VectorCopy(targ->client->v_angle, ent->client->v_angle);
|
||||
}
|
||||
|
@ -153,4 +155,3 @@ void GetChaseTarget(edict_t *ent)
|
|||
}
|
||||
gi.centerprintf(ent, "No other players to chase.");
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1448,7 +1448,7 @@ void SP_func_plat2 (edict_t *ent)
|
|||
}
|
||||
|
||||
|
||||
//PMM Added to kill things it's being blocked by
|
||||
// PMM Added to kill things it's being blocked by
|
||||
if (!ent->dmg)
|
||||
ent->dmg = 2;
|
||||
|
||||
|
@ -1497,7 +1497,7 @@ void SP_func_plat2 (edict_t *ent)
|
|||
}
|
||||
}
|
||||
|
||||
ent->postthink = train_move_children; //supports movewith
|
||||
ent->postthink = train_move_children; // supports movewith
|
||||
|
||||
gi.linkentity (ent);
|
||||
|
||||
|
@ -3248,12 +3248,14 @@ void train_move_children (edict_t *self)
|
|||
vec3_t parent_angle_change, offset;
|
||||
qboolean is_monster;
|
||||
|
||||
if (!self->inuse)
|
||||
return;
|
||||
if (!self->classname)
|
||||
return;
|
||||
if (!self->targetname)
|
||||
return;
|
||||
|
||||
ent = g_edicts+1; // Skip the worldspawn
|
||||
ent = g_edicts+1; // Skip the worldspawn
|
||||
for (i = 1; i < globals.num_edicts; i++, ent++)
|
||||
{
|
||||
if (!ent->classname)
|
||||
|
@ -3261,8 +3263,9 @@ void train_move_children (edict_t *self)
|
|||
if (!ent->movewith)
|
||||
continue;
|
||||
if (!ent->inuse)
|
||||
return;
|
||||
if (!strcmp(ent->movewith, self->targetname))
|
||||
// break;
|
||||
continue;
|
||||
if ( !strcmp(ent->movewith, self->targetname) )
|
||||
{
|
||||
ent->movewith_ent = self;
|
||||
// Backup and set movetype to push
|
||||
|
@ -3281,7 +3284,8 @@ void train_move_children (edict_t *self)
|
|||
VectorCopy (ent->s.angles, ent->child_attach_angles);
|
||||
|
||||
// Knightmare- backup turret's old angle offset
|
||||
if (!strcmp(ent->classname, "monster_turret") && ent->offset)
|
||||
// if ( !strcmp(ent->classname, "monster_turret") && ent->offset )
|
||||
if ( (ent->class_id == ENTITY_MONSTER_TURRET) && ent->offset )
|
||||
VectorCopy (ent->offset, ent->old_offset);
|
||||
|
||||
ent->movewith_set = 1;
|
||||
|
@ -3315,12 +3319,16 @@ void train_move_children (edict_t *self)
|
|||
*/
|
||||
|
||||
// For all but buttons, doors, and plats, move origin and match velocities
|
||||
if ( strcmp(ent->classname, "func_door") && strcmp(ent->classname, "func_button")
|
||||
// && strcmp(ent->classname, "func_door_secret") && strcmp(ent->classname, "func_door_secret2")
|
||||
&& (ent->class_id != ENTITY_FUNC_DOOR_SECRET) && (ent->class_id != ENTITY_FUNC_DOOR_SECRET2)
|
||||
/* if ( strcmp(ent->classname, "func_door") && strcmp(ent->classname, "func_button")
|
||||
&& strcmp(ent->classname, "func_door_secret") && strcmp(ent->classname, "func_door_secret2")
|
||||
&& strcmp(ent->classname, "func_plat") && strcmp(ent->classname, "func_plat2")
|
||||
&& strcmp(ent->classname, "func_water") && strcmp(ent->classname, "turret_wall")
|
||||
&& (strcmp(ent->classname, "monster_turret") || !(ent->spawnflags & 128)) )
|
||||
&& (strcmp(ent->classname, "monster_turret") || !(ent->spawnflags & 128)) )*/
|
||||
if ( (ent->class_id != ENTITY_FUNC_DOOR) && (ent->class_id != ENTITY_FUNC_BUTTON)
|
||||
&& (ent->class_id != ENTITY_FUNC_DOOR_SECRET) && (ent->class_id != ENTITY_FUNC_DOOR_SECRET2)
|
||||
&& (ent->class_id != ENTITY_FUNC_PLAT) && (ent->class_id != ENTITY_FUNC_PLAT2)
|
||||
&& (ent->class_id != ENTITY_FUNC_WATER) && (ent->class_id != ENTITY_TURRET_WALL)
|
||||
&& ( (ent->class_id != ENTITY_MONSTER_TURRET) || !(ent->spawnflags & 128) ) )
|
||||
{
|
||||
VectorMA (self->s.origin, ent->movewith_offset[0], forward, ent->s.origin);
|
||||
VectorMA (ent->s.origin, ent->movewith_offset[1], right, ent->s.origin);
|
||||
|
@ -3349,7 +3357,8 @@ void train_move_children (edict_t *self)
|
|||
// Match angular velocities
|
||||
if (self->turn_rider)
|
||||
{
|
||||
if (!strcmp(ent->classname, "func_rotating"))
|
||||
// if (!strcmp(ent->classname, "func_rotating"))
|
||||
if (ent->class_id == ENTITY_FUNC_ROTATING)
|
||||
{
|
||||
/* if (ent->movedir[0] > 0)
|
||||
ent->s.angles[1] = self->s.angles[1];
|
||||
|
@ -3387,9 +3396,11 @@ void train_move_children (edict_t *self)
|
|||
// their own.
|
||||
if (!ent->do_not_rotate)
|
||||
{
|
||||
if ( !strcmp(ent->classname, "turret_breach") || !strcmp(ent->classname, "turret_base") )
|
||||
// if ( !strcmp(ent->classname, "turret_breach") || !strcmp(ent->classname, "turret_base") )
|
||||
if ( (ent->class_id == ENTITY_TURRET_BREACH) || (ent->class_id == ENTITY_TURRET_BASE) )
|
||||
VectorCopy (self->avelocity, ent->avelocity);
|
||||
else if (!strcmp(ent->classname, "func_door_rotating"))
|
||||
// else if (!strcmp(ent->classname, "func_door_rotating"))
|
||||
else if (ent->class_id == ENTITY_FUNC_DOOR_ROTATING)
|
||||
{
|
||||
VectorCopy (self->avelocity, ent->avelocity);
|
||||
// VectorCopy (parent_angle_change, ent->pos1);
|
||||
|
@ -3404,7 +3415,7 @@ void train_move_children (edict_t *self)
|
|||
VectorCopy (ent->s.origin, ent->moveinfo.end_origin);
|
||||
VectorCopy (ent->pos2, ent->moveinfo.end_angles);
|
||||
}
|
||||
//don't move child's angles if not moving self
|
||||
// don't move child's angles if not moving self
|
||||
else if (ent->solid == SOLID_BSP) //&& (VectorLength(self->velocity) || VectorLength(self->avelocity)) )
|
||||
{ // Brush models always start out with angles=0,0,0 (after G_SetMoveDir).
|
||||
// Use more accuracy here.
|
||||
|
@ -3430,7 +3441,8 @@ void train_move_children (edict_t *self)
|
|||
else if (is_monster)
|
||||
{
|
||||
// Knightmare- adjust monster_turret's aiming angles for yaw movement
|
||||
if (!strcmp(ent->classname, "monster_turret") && amove[YAW] != 0)
|
||||
// if (!strcmp(ent->classname, "monster_turret") && (amove[YAW] != 0) )
|
||||
if ( (ent->class_id == ENTITY_MONSTER_TURRET) && (amove[YAW] != 0) )
|
||||
{
|
||||
if (ent->offset && ent->old_offset && (ent->offset[1] != -1 && ent->offset[1] != -2))
|
||||
{
|
||||
|
@ -3456,17 +3468,22 @@ void train_move_children (edict_t *self)
|
|||
}
|
||||
// Special cases:
|
||||
// Func_door/func_button and trigger fields
|
||||
if ( !strcmp(ent->classname, "func_door") || !strcmp(ent->classname, "func_button")
|
||||
// || !strcmp(ent->classname, "func_door_secret") || !strcmp(ent->classname, "func_door_secret2")
|
||||
|| (ent->class_id == ENTITY_FUNC_DOOR_SECRET) || (ent->class_id == ENTITY_FUNC_DOOR_SECRET2)
|
||||
/* if ( !strcmp(ent->classname, "func_door") || !strcmp(ent->classname, "func_button")
|
||||
|| !strcmp(ent->classname, "func_door_secret") || !strcmp(ent->classname, "func_door_secret2")
|
||||
|| !strcmp(ent->classname, "func_plat") || !strcmp(ent->classname, "func_plat2")
|
||||
|| !strcmp(ent->classname, "func_water") || !strcmp(ent->classname, "turret_wall")
|
||||
|| (!strcmp(ent->classname, "monster_turret") && ent->spawnflags & 128) )
|
||||
|| ( !strcmp(ent->classname, "monster_turret") && (ent->spawnflags & 128) ) )*/
|
||||
if ( (ent->class_id == ENTITY_FUNC_DOOR) || (ent->class_id == ENTITY_FUNC_BUTTON)
|
||||
|| (ent->class_id == ENTITY_FUNC_DOOR_SECRET) || (ent->class_id == ENTITY_FUNC_DOOR_SECRET2)
|
||||
|| (ent->class_id == ENTITY_FUNC_PLAT) || (ent->class_id == ENTITY_FUNC_PLAT2)
|
||||
|| (ent->class_id == ENTITY_FUNC_WATER) || (ent->class_id == ENTITY_TURRET_WALL)
|
||||
|| ( (ent->class_id == ENTITY_MONSTER_TURRET) && (ent->spawnflags & 128) ) )
|
||||
{
|
||||
VectorAdd (ent->s.angles, ent->org_angles, angles);
|
||||
G_SetMovedir (angles, ent->movedir);
|
||||
// Knightmare- these entities need special calculations
|
||||
if (!strcmp(ent->classname, "monster_turret") || !strcmp(ent->classname, "turret_wall"))
|
||||
// if (!strcmp(ent->classname, "monster_turret") || !strcmp(ent->classname, "turret_wall"))
|
||||
if ( (ent->class_id == ENTITY_MONSTER_TURRET) || (ent->class_id == ENTITY_TURRET_WALL) )
|
||||
{
|
||||
vec3_t eforward, tangles;
|
||||
|
||||
|
@ -3520,7 +3537,8 @@ void train_move_children (edict_t *self)
|
|||
VectorAdd (ent->pos1, eforward, ent->pos2);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(ent->classname, "func_plat") || !strcmp(ent->classname, "func_plat2"))
|
||||
// else if (!strcmp(ent->classname, "func_plat") || !strcmp(ent->classname, "func_plat2"))
|
||||
else if ( (ent->class_id == ENTITY_FUNC_PLAT) || (ent->class_id == ENTITY_FUNC_PLAT2) )
|
||||
{
|
||||
VectorMA (self->s.origin, ent->movewith_offset[0], forward, ent->pos1);
|
||||
VectorMA (ent->pos1, ent->movewith_offset[1], right, ent->pos1);
|
||||
|
@ -3550,7 +3568,8 @@ void train_move_children (edict_t *self)
|
|||
// movement routines
|
||||
VectorCopy (self->velocity, ent->velocity);
|
||||
// Sanity insurance:
|
||||
if (!strcmp(ent->classname, "func_plat") || !strcmp(ent->classname, "func_plat2"))
|
||||
// if (!strcmp(ent->classname, "func_plat") || !strcmp(ent->classname, "func_plat2"))
|
||||
if ( (ent->class_id == ENTITY_FUNC_PLAT) || (ent->class_id == ENTITY_FUNC_PLAT2) )
|
||||
{ // top and bottom states are reversed for plats
|
||||
if (ent->moveinfo.state == STATE_BOTTOM)
|
||||
VectorCopy (ent->pos2, ent->s.origin);
|
||||
|
@ -3571,13 +3590,18 @@ void train_move_children (edict_t *self)
|
|||
if (amove[YAW])
|
||||
{
|
||||
// Cross fingers here... move bounding boxes of doors and buttons
|
||||
if ( !strcmp(ent->classname, "func_door") || !strcmp(ent->classname, "func_button")
|
||||
// || !strcmp(ent->classname, "func_door_secret") || !strcmp(ent->classname, "func_door_secret2")
|
||||
|| (ent->class_id == ENTITY_FUNC_DOOR_SECRET) || (ent->class_id == ENTITY_FUNC_DOOR_SECRET2)
|
||||
/* if ( !strcmp(ent->classname, "func_door") || !strcmp(ent->classname, "func_button")
|
||||
|| !strcmp(ent->classname, "func_door_secret") || !strcmp(ent->classname, "func_door_secret2")
|
||||
|| !strcmp(ent->classname, "func_plat") || !strcmp(ent->classname, "func_plat2")
|
||||
|| !strcmp(ent->classname, "func_water") || (ent->solid == SOLID_TRIGGER)
|
||||
|| !strcmp(ent->classname, "turret_wall")
|
||||
|| (!strcmp(ent->classname, "monster_turret") && ent->spawnflags & 128) )
|
||||
|| ( !strcmp(ent->classname, "monster_turret") && (ent->spawnflags & 128) ) )*/
|
||||
if ( (ent->class_id == ENTITY_FUNC_DOOR) || (ent->class_id == ENTITY_FUNC_BUTTON)
|
||||
|| (ent->class_id == ENTITY_FUNC_DOOR_SECRET) || (ent->class_id == ENTITY_FUNC_DOOR_SECRET2)
|
||||
|| (ent->class_id == ENTITY_FUNC_PLAT) || (ent->class_id == ENTITY_FUNC_PLAT2)
|
||||
|| (ent->class_id == ENTITY_FUNC_WATER) || (ent->solid == SOLID_TRIGGER)
|
||||
|| (ent->class_id == ENTITY_TURRET_WALL)
|
||||
|| ( (ent->class_id == ENTITY_MONSTER_TURRET) && (ent->spawnflags & 128) ) )
|
||||
{
|
||||
float ca, sa, yaw;
|
||||
vec3_t p00, p01, p10, p11;
|
||||
|
@ -3614,7 +3638,8 @@ void train_move_children (edict_t *self)
|
|||
}
|
||||
|
||||
// FMOD
|
||||
if (!Q_stricmp(ent->classname, "target_playback"))
|
||||
// if (!Q_stricmp(ent->classname, "target_playback"))
|
||||
if (ent->class_id == ENTITY_TARGET_PLAYBACK)
|
||||
FMOD_UpdateSpeakerPos(ent);
|
||||
|
||||
// Correct func_door_rotating start/end positions
|
||||
|
@ -4582,10 +4607,10 @@ void func_train_find (edict_t *self)
|
|||
|
||||
VectorAdd (dir, e->s.origin, e->s.origin);
|
||||
VectorCopy (e->s.origin, e->s.old_origin);
|
||||
//This is now the child's original position
|
||||
// This is now the child's original position
|
||||
if ( (e->solid == SOLID_BSP) && strcmp(e->classname, "func_rotating")
|
||||
&& strcmp(e->classname, "func_door_rotating"))
|
||||
ReInitialize_Entity(e);
|
||||
ReInitialize_Entity (e);
|
||||
gi.linkentity (e);
|
||||
}
|
||||
}
|
||||
|
@ -5159,10 +5184,11 @@ void door_secret_done (edict_t *self)
|
|||
{
|
||||
if (!(self->targetname) || (self->spawnflags & SECRET_ALWAYS_SHOOT))
|
||||
{
|
||||
self->health = 0;
|
||||
// self->health = 0;
|
||||
self->health = self->max_health; // Knightmare- restore max health
|
||||
self->takedamage = DAMAGE_YES;
|
||||
}
|
||||
self->moveinfo.state = STATE_LOWEST;
|
||||
self->moveinfo.state = STATE_LOWEST; // Knightmare added
|
||||
|
||||
// added sound
|
||||
self->s.sound = 0;
|
||||
|
@ -5240,11 +5266,14 @@ void SP_func_door_secret (edict_t *ent)
|
|||
|
||||
ent->use = door_secret_use;
|
||||
ent->blocked = door_secret_blocked; // Knightmare- this was missing
|
||||
ent->moveinfo.state = STATE_LOWEST;
|
||||
ent->moveinfo.state = STATE_LOWEST; // Knightmare added
|
||||
|
||||
if (!(ent->targetname) || (ent->spawnflags & SECRET_ALWAYS_SHOOT))
|
||||
{
|
||||
ent->health = 0;
|
||||
if (!ent->health) {
|
||||
ent->health = 1; // Knightmare- was 0
|
||||
}
|
||||
ent->max_health = ent->health; // Knightmare- store health value
|
||||
ent->takedamage = DAMAGE_YES;
|
||||
ent->die = door_secret_die;
|
||||
}
|
||||
|
@ -5262,7 +5291,9 @@ void SP_func_door_secret (edict_t *ent)
|
|||
// calculate positions
|
||||
VectorCopy (ent->s.origin, ent->pos0);
|
||||
AngleVectors (ent->s.angles, forward, right, up);
|
||||
VectorClear (ent->s.angles);
|
||||
// VectorClear (ent->s.angles);
|
||||
VectorCopy (ent->s.angles, ent->move_angles); // Knightmare- backup angles to move_angles
|
||||
G_SetMovedir (ent->s.angles, ent->movedir); // Knightmare- don't just clear angles, set movedir as well
|
||||
// ent->side = 1.0 - (ent->spawnflags & SECRET_1ST_LEFT);
|
||||
|
||||
if (ent->spawnflags & SECRET_1ST_LEFT)
|
||||
|
@ -6013,7 +6044,7 @@ void SP_func_door_swinging (edict_t *self)
|
|||
{
|
||||
int pivot;
|
||||
|
||||
self->class_id = ENTITY_FUNC_PIVOT;
|
||||
self->class_id = ENTITY_FUNC_DOOR_SWINGING;
|
||||
|
||||
pivot = self->spawnflags & 1; // 1 means "start open" for normal doors, so turn it
|
||||
self->spawnflags &= ~1; // off temporarily until normal door initialization
|
||||
|
@ -6106,8 +6137,11 @@ void SP_func_bobbingwater(edict_t *self)
|
|||
{
|
||||
vec3_t abs_movedir;
|
||||
|
||||
self->class_id = ENTITY_FUNC_BOBBINGWATER;
|
||||
|
||||
if (!VectorLength(self->movedir))
|
||||
G_SetMovedir (self->s.angles, self->movedir);
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
self->solid = SOLID_BSP;
|
||||
gi.setmodel (self, self->model);
|
||||
|
@ -6312,6 +6346,8 @@ void pivot_init (edict_t *ent)
|
|||
|
||||
void SP_func_pivot (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_FUNC_PIVOT;
|
||||
|
||||
ent->solid = SOLID_BSP;
|
||||
ent->movetype = MOVETYPE_PUSH;
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ void DoRespawn (edict_t *ent)
|
|||
|
||||
//=====
|
||||
//ROGUE
|
||||
if(randomrespawn && randomrespawn->value)
|
||||
if (randomrespawn && randomrespawn->value)
|
||||
{
|
||||
edict_t *newEnt;
|
||||
|
||||
|
@ -281,7 +281,7 @@ void DoRespawn (edict_t *ent)
|
|||
|
||||
// if we've changed entities, then do some sleight of hand.
|
||||
// otherwise, the old entity will respawn
|
||||
if(newEnt)
|
||||
if (newEnt)
|
||||
{
|
||||
G_FreeEdict (ent);
|
||||
ent = newEnt;
|
||||
|
@ -327,15 +327,15 @@ qboolean Pickup_Powerup (edict_t *ent, edict_t *other)
|
|||
return false;
|
||||
|
||||
#ifdef JETPACK_MOD
|
||||
if( !Q_stricmp(ent->classname,"item_jetpack") )
|
||||
if ( !Q_stricmp(ent->classname,"item_jetpack") )
|
||||
{
|
||||
gitem_t *fuel;
|
||||
|
||||
if( quantity >= 1 )
|
||||
if ( quantity >= 1 )
|
||||
return false;
|
||||
|
||||
fuel = FindItem("Fuel");
|
||||
if(ent->count < 0)
|
||||
if (ent->count < 0)
|
||||
{
|
||||
other->client->jetpack_infinite = true;
|
||||
Add_Ammo(other,fuel,100000);
|
||||
|
@ -366,7 +366,7 @@ qboolean Pickup_Powerup (edict_t *ent, edict_t *other)
|
|||
|
||||
#ifdef JETPACK_MOD
|
||||
// DON'T Instant-use Jetpack
|
||||
if(ent->item->use == Use_Jet) return true;
|
||||
if (ent->item->use == Use_Jet) return true;
|
||||
#endif
|
||||
|
||||
if ( ((int)dmflags->value & DF_INSTANT_ITEMS)
|
||||
|
@ -382,7 +382,7 @@ qboolean Pickup_Powerup (edict_t *ent, edict_t *other)
|
|||
ent->item->use (other, ent->item);
|
||||
}
|
||||
//PGM
|
||||
/* if(ent->item->use)
|
||||
/* if (ent->item->use)
|
||||
ent->item->use (other, ent->item);
|
||||
else
|
||||
gi.dprintf("Powerup has no use function!\n");*/
|
||||
|
@ -403,14 +403,14 @@ void Drop_General (edict_t *ent, gitem_t *item)
|
|||
#ifdef JETPACK_MOD
|
||||
void Drop_Jetpack (edict_t *ent, gitem_t *item)
|
||||
{
|
||||
if(ent->client->jetpack)
|
||||
if (ent->client->jetpack)
|
||||
gi.cprintf(ent,PRINT_HIGH,"Cannot drop jetpack in use\n");
|
||||
else
|
||||
{
|
||||
edict_t *dropped;
|
||||
|
||||
dropped = Drop_Item (ent, item);
|
||||
if(ent->client->jetpack_infinite)
|
||||
if (ent->client->jetpack_infinite)
|
||||
{
|
||||
dropped->count = -1;
|
||||
ent->client->pers.inventory[fuel_index] = 0;
|
||||
|
@ -419,7 +419,7 @@ void Drop_Jetpack (edict_t *ent, gitem_t *item)
|
|||
else
|
||||
{
|
||||
dropped->count = ent->client->pers.inventory[fuel_index];
|
||||
if(dropped->count > 500)
|
||||
if (dropped->count > 500)
|
||||
dropped->count = 500;
|
||||
ent->client->pers.inventory[fuel_index] -= dropped->count;
|
||||
}
|
||||
|
@ -836,7 +836,7 @@ void Use_Compass (edict_t *ent, gitem_t *item)
|
|||
int ang;
|
||||
|
||||
ang = (int)(ent->client->v_angle[1]);
|
||||
if(ang<0)
|
||||
if (ang<0)
|
||||
ang += 360;
|
||||
|
||||
gi.cprintf(ent, PRINT_HIGH, "Origin: %0.0f,%0.0f,%0.0f Dir: %d\n", ent->s.origin[0], ent->s.origin[1],
|
||||
|
@ -885,10 +885,10 @@ void Use_Doppleganger (edict_t *ent, gitem_t *item)
|
|||
|
||||
VectorMA(ent->s.origin, 48, forward, createPt);
|
||||
|
||||
if(!FindSpawnPoint(createPt, ent->mins, ent->maxs, spawnPt, 32))
|
||||
if (!FindSpawnPoint(createPt, ent->mins, ent->maxs, spawnPt, 32))
|
||||
return;
|
||||
|
||||
if(!CheckGroundSpawnPoint(spawnPt, ent->mins, ent->maxs, 64, -1))
|
||||
if (!CheckGroundSpawnPoint(spawnPt, ent->mins, ent->maxs, 64, -1))
|
||||
return;
|
||||
|
||||
ent->client->pers.inventory[ITEM_INDEX(item)]--;
|
||||
|
@ -902,7 +902,7 @@ qboolean Pickup_Doppleganger (edict_t *ent, edict_t *other)
|
|||
{
|
||||
int quantity;
|
||||
|
||||
//if(!(deathmatch->value)) // item is DM only
|
||||
//if (!(deathmatch->value)) // item is DM only
|
||||
//return false;
|
||||
|
||||
quantity = other->client->pers.inventory[ITEM_INDEX(ent->item)];
|
||||
|
@ -922,7 +922,7 @@ qboolean Pickup_Sphere (edict_t *ent, edict_t *other)
|
|||
{
|
||||
int quantity;
|
||||
|
||||
if(other->client && other->client->owned_sphere)
|
||||
if (other->client && other->client->owned_sphere)
|
||||
{
|
||||
// gi.cprintf(other, PRINT_HIGH, "Only one sphere to a customer!\n");
|
||||
// return false;
|
||||
|
@ -944,7 +944,7 @@ qboolean Pickup_Sphere (edict_t *ent, edict_t *other)
|
|||
if (((int)dmflags->value & DF_INSTANT_ITEMS))
|
||||
{
|
||||
//PGM
|
||||
if(ent->item->use)
|
||||
if (ent->item->use)
|
||||
ent->item->use (other, ent->item);
|
||||
else
|
||||
gi.dprintf("Powerup has no use function!\n");
|
||||
|
@ -957,7 +957,7 @@ qboolean Pickup_Sphere (edict_t *ent, edict_t *other)
|
|||
|
||||
void Use_Defender (edict_t *ent, gitem_t *item)
|
||||
{
|
||||
if(ent->client && ent->client->owned_sphere)
|
||||
if (ent->client && ent->client->owned_sphere)
|
||||
{
|
||||
gi.cprintf(ent, PRINT_HIGH, "Only one sphere at a time!\n");
|
||||
return;
|
||||
|
@ -971,7 +971,7 @@ void Use_Defender (edict_t *ent, gitem_t *item)
|
|||
|
||||
void Use_Hunter (edict_t *ent, gitem_t *item)
|
||||
{
|
||||
if(ent->client && ent->client->owned_sphere)
|
||||
if (ent->client && ent->client->owned_sphere)
|
||||
{
|
||||
gi.cprintf(ent, PRINT_HIGH, "Only one sphere at a time!\n");
|
||||
return;
|
||||
|
@ -985,7 +985,7 @@ void Use_Hunter (edict_t *ent, gitem_t *item)
|
|||
|
||||
void Use_Vengeance (edict_t *ent, gitem_t *item)
|
||||
{
|
||||
if(ent->client && ent->client->owned_sphere)
|
||||
if (ent->client && ent->client->owned_sphere)
|
||||
{
|
||||
gi.cprintf(ent, PRINT_HIGH, "Only one sphere at a time!\n");
|
||||
return;
|
||||
|
@ -2144,7 +2144,7 @@ void Item_TriggeredSpawn (edict_t *self, edict_t *other, edict_t *activator)
|
|||
void SetTriggeredSpawn (edict_t *ent)
|
||||
{
|
||||
// don't do anything on key_power_cubes.
|
||||
if(!strcmp(ent->classname, "key_power_cube"))
|
||||
if (!strcmp(ent->classname, "key_power_cube"))
|
||||
return;
|
||||
|
||||
ent->think = NULL;
|
||||
|
@ -4877,6 +4877,7 @@ void SP_item_health (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
self->class_id = ENTITY_ITEM_HEALTH;
|
||||
|
||||
self->model = "models/items/healing/medium/tris.md2";
|
||||
self->count = 10;
|
||||
|
@ -4893,6 +4894,7 @@ void SP_item_health_small (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
self->class_id = ENTITY_ITEM_HEALTH_SMALL;
|
||||
|
||||
self->model = "models/items/healing/stimpack/tris.md2";
|
||||
self->count = sk_health_bonus_value->value; // Knightmare- made this cvar
|
||||
|
@ -4910,6 +4912,7 @@ void SP_item_health_large (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
self->class_id = ENTITY_ITEM_HEALTH_LARGE;
|
||||
|
||||
self->model = "models/items/healing/large/tris.md2";
|
||||
self->count = 25;
|
||||
|
@ -4926,6 +4929,7 @@ void SP_item_health_mega (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
self->class_id = ENTITY_ITEM_HEALTH_MEGA;
|
||||
|
||||
self->model = "models/items/mega_h/tris.md2";
|
||||
self->count = 100;
|
||||
|
@ -4942,6 +4946,7 @@ void SP_item_foodcube (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
self->class_id = ENTITY_ITEM_FOODCUBE;
|
||||
|
||||
self->model = "models/objects/trapfx/tris.md2";
|
||||
SpawnItem (self, FindItem ("Health"));
|
||||
|
@ -4958,7 +4963,6 @@ void InitItems (void)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
SetItemNames
|
||||
|
@ -5020,7 +5024,7 @@ void SetItemNames (void)
|
|||
//==============================================================================
|
||||
void Use_Jet ( edict_t *ent, gitem_t *item )
|
||||
{
|
||||
if(ent->client->jetpack)
|
||||
if (ent->client->jetpack)
|
||||
{
|
||||
// Currently on... turn it off and store remaining time
|
||||
ent->client->jetpack = false;
|
||||
|
@ -5044,7 +5048,7 @@ void Use_Jet ( edict_t *ent, gitem_t *item )
|
|||
|
||||
// Currently off. Turn it on, and add time, if any, remaining
|
||||
// from last jetpack.
|
||||
if( ent->client->pers.inventory[ITEM_INDEX(item)] )
|
||||
if ( ent->client->pers.inventory[ITEM_INDEX(item)] )
|
||||
{
|
||||
ent->client->jetpack = true;
|
||||
// Lazarus: Never remove jetpack from inventory (unless dropped)
|
||||
|
@ -5053,7 +5057,7 @@ void Use_Jet ( edict_t *ent, gitem_t *item )
|
|||
ent->client->jetpack_framenum = level.framenum;
|
||||
ent->client->jetpack_activation = level.framenum;
|
||||
}
|
||||
else if(ent->client->pers.inventory[fuel_index] > 0)
|
||||
else if (ent->client->pers.inventory[fuel_index] > 0)
|
||||
{
|
||||
ent->client->jetpack = true;
|
||||
ent->client->jetpack_framenum = level.framenum;
|
||||
|
@ -5070,7 +5074,7 @@ void Use_Jet ( edict_t *ent, gitem_t *item )
|
|||
// Lazarus: Stasis field generator
|
||||
void Use_Stasis ( edict_t *ent, gitem_t *item )
|
||||
{
|
||||
if(ent->client->jetpack)
|
||||
if (ent->client->jetpack)
|
||||
{
|
||||
gi.dprintf("Cannot use stasis generator while using jetpack\n");
|
||||
return;
|
||||
|
|
|
@ -2352,7 +2352,7 @@ struct edict_s
|
|||
char *deathtarget;
|
||||
char *combattarget;
|
||||
edict_t *target_ent;
|
||||
edict_t *movewith_ent; //Knightmare- movewith entity
|
||||
edict_t *movewith_ent; // Knightmare- movewith entity
|
||||
edict_t *movewith_next;
|
||||
edict_t *from;
|
||||
edict_t *to;
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
void SP_target_lock_digit (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_LOCK_DIGIT;
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
gi.setmodel (self, self->model);
|
||||
self->solid = SOLID_BSP;
|
||||
|
@ -28,7 +30,7 @@ void target_lock_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
n = e->count - 1;
|
||||
current[n] = '0' + e->s.frame;
|
||||
}
|
||||
if(strcmp(current,self->key_message)==0)
|
||||
if (strcmp(current,self->key_message)==0)
|
||||
{
|
||||
copy_message = self->message;
|
||||
self->message = NULL;
|
||||
|
@ -37,10 +39,10 @@ void target_lock_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(self->message) gi.centerprintf(activator,self->message);
|
||||
if(self->pathtarget) {
|
||||
if (self->message) gi.centerprintf(activator,self->message);
|
||||
if (self->pathtarget) {
|
||||
e = G_Find(NULL,FOFS(targetname),self->pathtarget);
|
||||
if(e) e->use(e,other,activator);
|
||||
if (e) e->use(e,other,activator);
|
||||
}
|
||||
else {
|
||||
BeepBeep(activator);
|
||||
|
@ -50,7 +52,7 @@ void target_lock_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void lock_digit_increment (edict_t *digit, edict_t *activator)
|
||||
{
|
||||
if(digit->s.frame == 9)
|
||||
if (digit->s.frame == 9)
|
||||
digit->s.frame = 0;
|
||||
else
|
||||
digit->s.frame++;
|
||||
|
@ -110,6 +112,9 @@ void SP_target_lock (edict_t *self)
|
|||
G_FreeEdict(self);
|
||||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_TARGET_LOCK;
|
||||
|
||||
if (self->spawnflags & 2) game.lock_hud = true;
|
||||
if (!self->key_message)
|
||||
self->key_message = "000000000";
|
||||
|
@ -128,9 +133,9 @@ void lock_code_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
{
|
||||
int i, L;
|
||||
char message[64];
|
||||
if(self->spawnflags & 1)
|
||||
if (self->spawnflags & 1)
|
||||
{
|
||||
if(!strlen(game.lock_code))
|
||||
if (!strlen(game.lock_code))
|
||||
{
|
||||
gi.dprintf("Lock has not been properly initialized.\n");
|
||||
return;
|
||||
|
@ -145,7 +150,7 @@ void lock_code_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
{
|
||||
edict_t *lock;
|
||||
lock = G_Find(NULL,FOFS(targetname),self->target);
|
||||
if(!lock)
|
||||
if (!lock)
|
||||
gi.dprintf("Target of target_lock_code does not exist\n");
|
||||
else
|
||||
{
|
||||
|
@ -160,7 +165,9 @@ void lock_code_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_lock_code (edict_t *self)
|
||||
{
|
||||
if(!self->target && !(self->spawnflags & 1))
|
||||
self->class_id = ENTITY_TARGET_LOCK_CODE;
|
||||
|
||||
if (!self->target && !(self->spawnflags & 1))
|
||||
{
|
||||
gi.dprintf("non-crosslevel target_lock_code w/o target\n");
|
||||
G_FreeEdict(self);
|
||||
|
@ -171,28 +178,28 @@ void SP_target_lock_code (edict_t *self)
|
|||
void lock_clue_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
int i, L;
|
||||
if(self->spawnflags & 1)
|
||||
if (self->spawnflags & 1)
|
||||
{
|
||||
if(!strlen(game.lock_code))
|
||||
if (!strlen(game.lock_code))
|
||||
{
|
||||
gi.dprintf("Lock has not been properly initialized.\n");
|
||||
return;
|
||||
}
|
||||
L = (int)strlen(game.lock_code);
|
||||
for(i=0; i<L; i++)
|
||||
if(self->message[i] != '?') game.lock_revealed |= 1<<i;
|
||||
if (self->message[i] != '?') game.lock_revealed |= 1<<i;
|
||||
}
|
||||
else
|
||||
{
|
||||
edict_t *lock;
|
||||
lock = G_Find(NULL,FOFS(targetname),self->target);
|
||||
if(!lock)
|
||||
if (!lock)
|
||||
gi.dprintf("Target of target_lock_clue does not exist\n");
|
||||
else
|
||||
{
|
||||
L = min(8, (int)strlen(lock->key_message));
|
||||
for(i=0; i<L; i++)
|
||||
if(self->message[i] != '?') game.lock_revealed |= 1<<i;
|
||||
if (self->message[i] != '?') game.lock_revealed |= 1<<i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +210,7 @@ void lock_clue_think(edict_t *self)
|
|||
int unrevealed_count;
|
||||
edict_t *e;
|
||||
|
||||
if(!self->team)
|
||||
if (!self->team)
|
||||
return;
|
||||
|
||||
unrevealed_count = 0;
|
||||
|
@ -212,16 +219,16 @@ void lock_clue_think(edict_t *self)
|
|||
if (!e->count)
|
||||
continue;
|
||||
n = e->count - 1;
|
||||
if(game.lock_revealed & 1<<n)
|
||||
if (game.lock_revealed & 1<<n)
|
||||
e->s.frame = game.lock_code[n] - '0';
|
||||
else
|
||||
{
|
||||
e->s.frame++; // spin unknown digits
|
||||
if(e->s.frame > 9) e->s.frame = 0;
|
||||
if (e->s.frame > 9) e->s.frame = 0;
|
||||
unrevealed_count++;
|
||||
}
|
||||
}
|
||||
if(unrevealed_count)
|
||||
if (unrevealed_count)
|
||||
{
|
||||
self->nextthink = level.time + FRAMETIME;
|
||||
gi.linkentity(self);
|
||||
|
@ -233,7 +240,7 @@ void lock_clue_initialize(edict_t *self)
|
|||
// show the same numbers across the board.
|
||||
|
||||
edict_t *e;
|
||||
if(self->team)
|
||||
if (self->team)
|
||||
{
|
||||
for (e = self->teammaster; e; e = e->teamchain)
|
||||
{
|
||||
|
@ -248,7 +255,9 @@ void lock_clue_initialize(edict_t *self)
|
|||
}
|
||||
void SP_target_lock_clue (edict_t *self)
|
||||
{
|
||||
if(!self->target && !(self->spawnflags & 1))
|
||||
self->class_id = ENTITY_TARGET_LOCK_CLUE;
|
||||
|
||||
if (!self->target && !(self->spawnflags & 1))
|
||||
{
|
||||
gi.dprintf("non-crosslevel target_lock_clue w/o target\n");
|
||||
G_FreeEdict(self);
|
||||
|
|
|
@ -23,6 +23,8 @@ void torch_think (edict_t *self)
|
|||
|
||||
void SP_light_torch (edict_t *self) // New function by Beel.
|
||||
{
|
||||
self->class_id = ENTITY_LIGHT_TORCH;
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->solid = SOLID_NOT;
|
||||
self->s.modelindex = gi.modelindex ("models/torch/tris.md2");
|
||||
|
@ -64,6 +66,8 @@ void bigflame_think (edict_t *self)
|
|||
|
||||
void SP_light_flame (edict_t *self) // New function by Beel. (small flame)
|
||||
{
|
||||
self->class_id = ENTITY_LIGHT_FLAME;
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->solid = SOLID_NOT;
|
||||
VectorSet (self->mins, -8, -8, 0);
|
||||
|
@ -336,7 +340,7 @@ void SP_model_spawn (edict_t *ent)
|
|||
{
|
||||
char modelname[256];
|
||||
|
||||
//paranoia check
|
||||
// paranoia check
|
||||
if ((!ent->usermodel) && (!ent->spawnflags & NO_MODEL) && !(ent->spawnflags & PLAYER_MODEL))
|
||||
{
|
||||
gi.dprintf("%s without a model and without NO_MODEL spawnflag at %s\n", ent->classname, vtos(ent->s.origin));
|
||||
|
@ -344,6 +348,8 @@ void SP_model_spawn (edict_t *ent)
|
|||
return;
|
||||
}
|
||||
|
||||
ent->class_id = ENTITY_MODEL_SPAWN;
|
||||
|
||||
switch (ent->solidstate)
|
||||
{
|
||||
case 1 : ent->solid = SOLID_NOT; ent->movetype = MOVETYPE_NONE; break;
|
||||
|
|
|
@ -39,6 +39,8 @@ Usually enclosed in the middle of a door.
|
|||
*/
|
||||
void SP_func_areaportal (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_FUNC_AREAPORTAL;
|
||||
|
||||
ent->use = Use_Areaportal;
|
||||
ent->count = 0; // always start closed;
|
||||
}
|
||||
|
@ -309,6 +311,7 @@ void ThrowGib (edict_t *self, char *gibname, int damage, int type)
|
|||
//PGM
|
||||
gib->s.renderfx |= RF_IR_VISIBLE;
|
||||
//PGM
|
||||
self->class_id = ENTITY_GIB;
|
||||
|
||||
gi.linkentity (gib);
|
||||
}
|
||||
|
@ -464,6 +467,7 @@ void ThrowHead (edict_t *self, char *gibname, int damage, int type)
|
|||
//PGM
|
||||
self->s.renderfx |= RF_IR_VISIBLE;
|
||||
//PGM
|
||||
self->class_id = ENTITY_GIBHEAD;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
@ -606,6 +610,8 @@ void ThrowDebris (edict_t *self, char *modelname, float speed, vec3_t origin, in
|
|||
chunk->s.skinnum = skin;
|
||||
chunk->s.effects |= effects;
|
||||
|
||||
chunk->class_id = ENTITY_DEBRIS;
|
||||
|
||||
gi.linkentity (chunk);
|
||||
}
|
||||
|
||||
|
@ -785,6 +791,8 @@ void SP_path_corner (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_PATH_CORNER;
|
||||
|
||||
self->solid = SOLID_TRIGGER;
|
||||
self->touch = path_corner_touch;
|
||||
VectorSet (self->mins, -8, -8, -8);
|
||||
|
@ -880,6 +888,9 @@ void SP_point_combat (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_POINT_COMBAT;
|
||||
|
||||
self->solid = SOLID_TRIGGER;
|
||||
self->touch = point_combat_touch;
|
||||
VectorSet (self->mins, -8, -8, -16);
|
||||
|
@ -902,6 +913,7 @@ void SP_viewthing(edict_t *ent)
|
|||
{
|
||||
gi.dprintf ("viewthing spawned\n");
|
||||
|
||||
ent->class_id = ENTITY_VIEWTHING;
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
ent->s.renderfx = RF_FRAMELERP;
|
||||
|
@ -929,6 +941,8 @@ Used as a positional target for lightning.
|
|||
*/
|
||||
void SP_info_notnull (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_INFO_NOTNULL;
|
||||
|
||||
VectorCopy (self->s.origin, self->absmin);
|
||||
VectorCopy (self->s.origin, self->absmax);
|
||||
};
|
||||
|
@ -973,6 +987,8 @@ void SP_light (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_LIGHT;
|
||||
|
||||
if (self->style >= 32)
|
||||
{
|
||||
self->use = light_use;
|
||||
|
@ -1142,6 +1158,8 @@ void SP_func_object (edict_t *self)
|
|||
|
||||
self->clipmask = MASK_MONSTERSOLID;
|
||||
|
||||
self->class_id = ENTITY_FUNC_OBJECT;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -1367,14 +1385,14 @@ void func_explosive_explode (edict_t *self)
|
|||
|
||||
G_UseTargets (self, self->activator);
|
||||
|
||||
//Knightmare- support for deathtarget
|
||||
// Knightmare- support for deathtarget
|
||||
if (self->deathtarget)
|
||||
{
|
||||
self->target = self->deathtarget;
|
||||
G_UseTargets (self, self->activator);
|
||||
}
|
||||
|
||||
//Knightmare- support for destroytarget
|
||||
// Knightmare- support for destroytarget
|
||||
if (self->destroytarget)
|
||||
{
|
||||
self->target = self->destroytarget;
|
||||
|
@ -1528,6 +1546,8 @@ void SP_func_explosive (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_FUNC_EXPLOSIVE;
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
|
||||
PrecacheDebris(self->gib_type);
|
||||
|
@ -1589,7 +1609,7 @@ void SP_func_explosive (edict_t *self)
|
|||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
void PrecacheDebris(int type)
|
||||
void PrecacheDebris (int type)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1698,7 +1718,7 @@ void func_breakaway_hit (edict_t *self, edict_t *other, cplane_t *plane, csurfac
|
|||
}
|
||||
if (plane && plane->normal)
|
||||
{
|
||||
//roll in direction of movement
|
||||
// roll in direction of movement
|
||||
if (!(self->spawnflags & BREAKAWAY_TARGET_ANGLE))
|
||||
{
|
||||
vectoangles (self->velocity, self->avelocity);
|
||||
|
@ -1839,7 +1859,7 @@ void func_breakaway_die (edict_t *self, edict_t *inflictor, edict_t *attacker, i
|
|||
self->takedamage = DAMAGE_NO;
|
||||
self->die = NULL;
|
||||
if (self->delay > 0)
|
||||
{ //Knightmare- clean up child movement stuff here
|
||||
{ // Knightmare- clean up child movement stuff here
|
||||
VectorClear(self->avelocity);
|
||||
self->movewith = "";
|
||||
self->movewith_set = 0;
|
||||
|
@ -1852,7 +1872,7 @@ void func_breakaway_die (edict_t *self, edict_t *inflictor, edict_t *attacker, i
|
|||
func_breakaway_fall (self);
|
||||
}
|
||||
|
||||
void func_breakaway_use(edict_t *self, edict_t *other, edict_t *activator)
|
||||
void func_breakaway_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
func_breakaway_die (self, self, other, self->speed, vec3_origin);
|
||||
}
|
||||
|
@ -1910,6 +1930,8 @@ void func_breakaway_activate(edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_func_breakaway (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_FUNC_BREAKAWAY;
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
gi.setmodel (self, self->model);
|
||||
G_SetMovedir (self->s.angles, self->movedir);
|
||||
|
@ -1937,7 +1959,7 @@ void SP_func_breakaway (edict_t *self)
|
|||
{
|
||||
if (!self->duration)
|
||||
self->duration = 5.0;
|
||||
//must stop rotating AFTER becoming solid
|
||||
// must stop rotating AFTER becoming solid
|
||||
if (self->duration <= self->wait)
|
||||
self->duration = self->wait + FRAMETIME;
|
||||
}
|
||||
|
@ -1976,9 +1998,9 @@ void SP_func_breakaway (edict_t *self)
|
|||
self->takedamage = DAMAGE_YES;
|
||||
}
|
||||
|
||||
self->postthink = train_move_children; //supports movewith
|
||||
self->postthink = train_move_children; // supports movewith
|
||||
|
||||
//touch function for impact damage
|
||||
// touch function for impact damage
|
||||
self->touch = func_breakaway_touch;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
@ -2226,6 +2248,8 @@ void SP_misc_explobox (edict_t *self)
|
|||
//PGM
|
||||
|
||||
self->common_name = "Exploding Barrel";
|
||||
self->class_id = ENTITY_MISC_EXPLOBOX;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -2237,7 +2261,7 @@ void SP_misc_explobox (edict_t *self)
|
|||
/*QUAKED misc_blackhole (1 .5 0) (-8 -8 -8) (8 8 8)
|
||||
*/
|
||||
|
||||
//David Hyde's prethink function
|
||||
// David Hyde's prethink function
|
||||
void misc_blackhole_transparent (edict_t *ent)
|
||||
{
|
||||
// Lazarus: This avoids the problem mentioned below.
|
||||
|
@ -2270,6 +2294,8 @@ void misc_blackhole_think (edict_t *self)
|
|||
|
||||
void SP_misc_blackhole (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_BLACKHOLE;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_NOT;
|
||||
VectorSet (ent->mins, -64, -64, 0);
|
||||
|
@ -2299,8 +2325,10 @@ void misc_eastertank_think (edict_t *self)
|
|||
|
||||
void SP_misc_eastertank (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_EASTERTANK;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
if (ent->spawnflags & 1) //Knightmare- not solid flag
|
||||
if (ent->spawnflags & 1) // Knightmare- not solid flag
|
||||
ent->solid = SOLID_NOT;
|
||||
else
|
||||
ent->solid = SOLID_BBOX;
|
||||
|
@ -2308,7 +2336,7 @@ void SP_misc_eastertank (edict_t *ent)
|
|||
VectorSet (ent->maxs, 32, 32, 32);
|
||||
ent->s.modelindex = gi.modelindex ("models/monsters/tank/tris.md2");
|
||||
ent->s.frame = 254;
|
||||
if (ent->spawnflags & 2) //Knightmare- commander skin
|
||||
if (ent->spawnflags & 2) // Knightmare- commander skin
|
||||
ent->s.skinnum = 2;
|
||||
ent->think = misc_eastertank_think;
|
||||
ent->nextthink = level.time + 2 * FRAMETIME;
|
||||
|
@ -2332,6 +2360,8 @@ void misc_easterchick_think (edict_t *self)
|
|||
|
||||
void SP_misc_easterchick (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_EASTERCHICK;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
VectorSet (ent->mins, -32, -32, 0);
|
||||
|
@ -2360,6 +2390,8 @@ void misc_easterchick2_think (edict_t *self)
|
|||
|
||||
void SP_misc_easterchick2 (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_EASTERCHICK2;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
VectorSet (ent->mins, -32, -32, 0);
|
||||
|
@ -2403,6 +2435,8 @@ void commander_body_drop (edict_t *self)
|
|||
|
||||
void SP_monster_commander_body (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_MONSTER_COMMANDER_BODY;
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->solid = SOLID_BBOX;
|
||||
self->model = "models/monsters/commandr/tris.md2";
|
||||
|
@ -2435,6 +2469,8 @@ void misc_banner_think (edict_t *ent)
|
|||
|
||||
void SP_misc_banner (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_BANNER;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_NOT;
|
||||
ent->s.modelindex = gi.modelindex ("models/objects/banner/tris.md2");
|
||||
|
@ -2524,6 +2560,7 @@ void SP_misc_deadsoldier (edict_t *ent)
|
|||
ent->s.skinnum = ent->style;
|
||||
}
|
||||
ent->common_name = "Dead Marine";
|
||||
ent->class_id = ENTITY_MISC_DEADSOLDIER;
|
||||
|
||||
gi.linkentity (ent);
|
||||
}
|
||||
|
@ -2700,14 +2737,14 @@ void SP_misc_crashviper (edict_t *ent)
|
|||
|
||||
ent->movetype = MOVETYPE_PUSH;
|
||||
ent->solid = SOLID_NOT;
|
||||
//Mappack
|
||||
// Mappack
|
||||
if (ent->spawnflags & 2)
|
||||
{
|
||||
ent->s.modelindex = gi.modelindex ("models/ships/viper/tris.md2");
|
||||
VectorSet (ent->mins, -16, -16, 0);
|
||||
VectorSet (ent->maxs, 16, 16, 32);
|
||||
|
||||
} //Mappack
|
||||
} // Mappack
|
||||
else
|
||||
{
|
||||
ent->s.modelindex = gi.modelindex ("models/ships/bigviper/tris.md2");
|
||||
|
@ -2730,7 +2767,7 @@ void SP_misc_crashviper (edict_t *ent)
|
|||
else
|
||||
ent->smooth_movement = 0;
|
||||
|
||||
//Knightmare- change both rotate flags to spline flag
|
||||
// Knightmare- change both rotate flags to spline flag
|
||||
if ((ent->spawnflags & TRAIN_ROTATE) && (ent->spawnflags &TRAIN_ROT_CONST))
|
||||
{
|
||||
ent->spawnflags &= ~TRAIN_ROTATE;
|
||||
|
@ -2738,7 +2775,7 @@ void SP_misc_crashviper (edict_t *ent)
|
|||
ent->spawnflags |= TRAIN_SPLINE;
|
||||
}
|
||||
|
||||
//Mappack
|
||||
// Mappack
|
||||
if (!ent->accel)
|
||||
ent->moveinfo.accel = ent->speed;
|
||||
else
|
||||
|
@ -2748,7 +2785,7 @@ void SP_misc_crashviper (edict_t *ent)
|
|||
else
|
||||
ent->moveinfo.decel = ent->decel;
|
||||
ent->moveinfo.speed = ent->speed;
|
||||
//Mappack
|
||||
// Mappack
|
||||
|
||||
// ent->moveinfo.accel = ent->moveinfo.decel = ent->moveinfo.speed = ent->speed;
|
||||
|
||||
|
@ -2767,6 +2804,8 @@ This is a large stationary viper as seen in Paul's intro
|
|||
*/
|
||||
void SP_misc_bigviper (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_BIGVIPER;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
VectorSet (ent->mins, -176, -120, -24);
|
||||
|
@ -2922,6 +2961,7 @@ void SP_misc_viper_bomb (edict_t *self)
|
|||
self->use = misc_viper_bomb_use;
|
||||
self->svflags |= SVF_NOCLIENT;
|
||||
self->common_name = "Bomb";
|
||||
self->class_id = ENTITY_MISC_VIPER_BOMB;
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -2974,6 +3014,7 @@ void SP_misc_viper_missile (edict_t *self)
|
|||
self->use = misc_viper_missile_use;
|
||||
self->svflags |= SVF_NOCLIENT;
|
||||
self->common_name = "Missile Shooter";
|
||||
self->class_id = ENTITY_MISC_VIPER_MISSILE;
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -3290,6 +3331,8 @@ void SP_misc_transport (edict_t *ent)
|
|||
return;
|
||||
}
|
||||
|
||||
ent->class_id = ENTITY_MISC_TRANSPORT;
|
||||
|
||||
if (!ent->speed)
|
||||
ent->speed = 300;
|
||||
|
||||
|
@ -3358,6 +3401,8 @@ void misc_satellite_dish_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_misc_satellite_dish (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_SATELLITE_DISH;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
VectorSet (ent->mins, -64, -64, 0);
|
||||
|
@ -3372,6 +3417,8 @@ void SP_misc_satellite_dish (edict_t *ent)
|
|||
*/
|
||||
void SP_light_mine1 (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_LIGHT_MINE1;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
ent->s.modelindex = gi.modelindex ("models/objects/minelite/light1/tris.md2");
|
||||
|
@ -3384,6 +3431,8 @@ void SP_light_mine1 (edict_t *ent)
|
|||
*/
|
||||
void SP_light_mine2 (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_LIGHT_MINE2;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
ent->s.modelindex = gi.modelindex ("models/objects/minelite/light2/tris.md2");
|
||||
|
@ -3397,6 +3446,8 @@ Intended for use with the target_spawner
|
|||
*/
|
||||
void SP_misc_gib_arm (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_GIB_ARM;
|
||||
|
||||
gi.setmodel (ent, "models/objects/gibs/arm/tris.md2");
|
||||
ent->solid = SOLID_NOT;
|
||||
ent->s.effects |= EF_GIB;
|
||||
|
@ -3418,6 +3469,8 @@ Intended for use with the target_spawner
|
|||
*/
|
||||
void SP_misc_gib_leg (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_GIB_LEG;
|
||||
|
||||
gi.setmodel (ent, "models/objects/gibs/leg/tris.md2");
|
||||
ent->solid = SOLID_NOT;
|
||||
ent->s.effects |= EF_GIB;
|
||||
|
@ -3439,6 +3492,8 @@ Intended for use with the target_spawner
|
|||
*/
|
||||
void SP_misc_gib_head (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_GIB_HEAD;
|
||||
|
||||
gi.setmodel (ent, "models/objects/gibs/head/tris.md2");
|
||||
ent->solid = SOLID_NOT;
|
||||
ent->s.effects |= EF_GIB;
|
||||
|
@ -3464,6 +3519,8 @@ used with target_string (must be on same "team")
|
|||
|
||||
void SP_target_character (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_CHARACTER;
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
gi.setmodel (self, self->model);
|
||||
self->solid = SOLID_BSP;
|
||||
|
@ -3511,6 +3568,8 @@ void SP_target_string (edict_t *self)
|
|||
if (!self->message)
|
||||
self->message = "";
|
||||
self->use = target_string_use;
|
||||
|
||||
self->class_id = ENTITY_TARGET_STRING;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3696,6 +3755,8 @@ void SP_func_clock (edict_t *self)
|
|||
self->use = func_clock_use;
|
||||
else
|
||||
self->nextthink = level.time + 1;
|
||||
|
||||
self->class_id = ENTITY_FUNC_CLOCK;
|
||||
}
|
||||
|
||||
/*==================================================================
|
||||
|
@ -4083,6 +4144,8 @@ void SP_misc_teleporter (edict_t *ent)
|
|||
ent->s.renderfx |= RF_IR_VISIBLE;
|
||||
|
||||
ent->common_name = "Teleporter";
|
||||
ent->class_id = ENTITY_MISC_TELEPORTER;
|
||||
|
||||
gi.linkentity (ent);
|
||||
|
||||
trig = G_Spawn ();
|
||||
|
@ -4094,13 +4157,13 @@ void SP_misc_teleporter (edict_t *ent)
|
|||
trig->solid = SOLID_TRIGGER;
|
||||
trig->target = ent->target;
|
||||
trig->owner = ent;
|
||||
|
||||
// Lazarus
|
||||
trig->movewith = ent->movewith;
|
||||
VectorCopy (ent->s.origin, trig->s.origin);
|
||||
VectorSet (trig->mins, -8, -8, 8);
|
||||
VectorSet (trig->maxs, 8, 8, 24);
|
||||
gi.linkentity (trig);
|
||||
|
||||
}
|
||||
|
||||
void trigger_teleporter_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
|
@ -4154,6 +4217,8 @@ void SP_trigger_teleporter (edict_t *self)
|
|||
else
|
||||
self->solid = SOLID_TRIGGER;
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_TELEPORTER;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -4217,6 +4282,9 @@ void SP_misc_teleporter_dest (edict_t *ent)
|
|||
ent->s.renderfx |= RF_IR_VISIBLE; // Knightmare added- make IR visible
|
||||
VectorSet (ent->mins, -32, -32, -24);
|
||||
VectorSet (ent->maxs, 32, 32, -16);
|
||||
|
||||
ent->class_id = ENTITY_MISC_TELEPORTER_DEST;
|
||||
|
||||
gi.linkentity (ent);
|
||||
}
|
||||
|
||||
|
@ -4233,6 +4301,8 @@ void amb4_think (edict_t *ent)
|
|||
|
||||
void SP_misc_amb4 (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_AMB4;
|
||||
|
||||
ent->think = amb4_think;
|
||||
ent->nextthink = level.time + 1;
|
||||
amb4sound = gi.soundindex ("world/amb4.wav");
|
||||
|
@ -4254,6 +4324,8 @@ toggles visible/not visible. starts visible.
|
|||
*/
|
||||
void SP_misc_nuke_core (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_NUKE_CORE;
|
||||
|
||||
gi.setmodel (ent, "models/objects/core/tris.md2");
|
||||
ent->s.renderfx |= RF_IR_VISIBLE;
|
||||
gi.linkentity (ent);
|
||||
|
@ -4289,10 +4361,12 @@ void use_nuke (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_misc_nuke (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_MISC_NUKE;
|
||||
|
||||
ent->use = use_nuke;
|
||||
}
|
||||
|
||||
//Knightmare- moved Xatrix rotating light and repair object here
|
||||
// Knightmare- moved Xatrix rotating light and repair object here
|
||||
|
||||
/*QUAKED rotating_light (0 1 0) (-8 -8 -8) (8 8 8) START_OFF ALARM
|
||||
"health" if set, the light may be killed.
|
||||
|
@ -4400,8 +4474,9 @@ void SP_rotating_light (edict_t *self)
|
|||
self->moveinfo.sound_start = gi.soundindex ("misc/alarm.wav");
|
||||
}
|
||||
|
||||
gi.linkentity (self);
|
||||
self->class_id = ENTITY_ROTATING_LIGHT;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
/*QUAKED func_object_repair (1 .5 0) (-8 -8 -8) (8 8 8)
|
||||
|
@ -4458,6 +4533,8 @@ void object_repair_sparks (edict_t *ent)
|
|||
|
||||
void SP_object_repair (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_OBJECT_REPAIR;
|
||||
|
||||
ent->movetype = MOVETYPE_NONE;
|
||||
ent->solid = SOLID_BBOX;
|
||||
ent->classname = "object_repair";
|
||||
|
@ -4496,6 +4573,13 @@ void misc_sick_guard_think (edict_t *ent)
|
|||
|
||||
void SP_misc_sick_guard (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_MISC_SICK_GUARD;
|
||||
|
||||
// precache
|
||||
gi.soundindex ("monsters/sick_guard/patient1b.wav");
|
||||
gi.soundindex ("monsters/sick_guard/patient2.wav");
|
||||
gi.soundindex ("monsters/sick_guard/patient3.wav");
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->solid = SOLID_BBOX;
|
||||
VectorSet (self->mins, -24, -32, -26);
|
||||
|
@ -4519,11 +4603,11 @@ model="models/monsters/gekk_writhe/"
|
|||
*/
|
||||
void misc_gekk_writhe_think (edict_t *self)
|
||||
{
|
||||
if (++self->s.frame < FRAME_death4_35) //was FRAME_death4_07
|
||||
if (++self->s.frame < FRAME_death4_35) // was FRAME_death4_07
|
||||
self->nextthink = level.time + FRAMETIME;
|
||||
else
|
||||
{
|
||||
self->s.frame = FRAME_death4_01; //was FRAME_death4_03
|
||||
self->s.frame = FRAME_death4_01; // was FRAME_death4_03
|
||||
self->nextthink = level.time + FRAMETIME;
|
||||
}
|
||||
}
|
||||
|
@ -4549,6 +4633,8 @@ void misc_gekk_writhe_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_misc_gekk_writhe (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_MISC_GEKK_WRITHE;
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->solid = SOLID_NOT;
|
||||
VectorSet (self->mins, -24, -24, -24);
|
||||
|
@ -4627,6 +4713,8 @@ void light_flame_spawn (edict_t *self)
|
|||
|
||||
void SP_light_flame1 (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_LIGHT_FLAME_CM;
|
||||
|
||||
self->s.modelindex = gi.modelindex ("sprites/s_flame1.sp2");
|
||||
VectorSet(self->mins,-48,-48,-32);
|
||||
VectorSet(self->maxs, 48, 48, 64);
|
||||
|
@ -4635,6 +4723,8 @@ void SP_light_flame1 (edict_t *self)
|
|||
|
||||
void SP_light_flame1s (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_LIGHT_FLAME_CM;
|
||||
|
||||
self->s.modelindex = gi.modelindex ("sprites/s_flame1s.sp2");
|
||||
VectorSet(self->mins,-16,-16,-16);
|
||||
VectorSet(self->maxs, 16, 16, 32);
|
||||
|
@ -4643,6 +4733,8 @@ void SP_light_flame1s (edict_t *self)
|
|||
|
||||
void SP_light_flame2 (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_LIGHT_FLAME_CM;
|
||||
|
||||
self->s.modelindex = gi.modelindex ("sprites/s_flame2.sp2");
|
||||
VectorSet(self->mins,-48,-48,-32);
|
||||
VectorSet(self->maxs, 48, 48, 64);
|
||||
|
@ -4651,6 +4743,8 @@ void SP_light_flame2 (edict_t *self)
|
|||
|
||||
void SP_light_flame2s (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_LIGHT_FLAME_CM;
|
||||
|
||||
self->s.modelindex = gi.modelindex ("sprites/s_flame2s.sp2");
|
||||
VectorSet(self->mins,-16,-16,-16);
|
||||
VectorSet(self->maxs, 16, 16, 32);
|
||||
|
@ -4693,6 +4787,8 @@ void SP_monster_coco_monkey (edict_t *self)
|
|||
self->think = monster_coco_monkey_think;
|
||||
self->common_name = "Coconut Monkey";
|
||||
|
||||
self->class_id = ENTITY_MONSTER_COCO_MONKEY;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -4729,6 +4825,8 @@ void misc_light_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_misc_light (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_MISC_LIGHT;
|
||||
|
||||
self->use = misc_light_use;
|
||||
if (self->movewith)
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
|
|
|
@ -30,6 +30,9 @@ frame="192"
|
|||
*/
|
||||
void SP_misc_q1_zombie_crucified (edict_t *self)
|
||||
{
|
||||
// precache
|
||||
gi.soundindex ("q1zombie/idle_w2.wav");
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->solid = SOLID_NOT;
|
||||
VectorSet (self->mins, -16, -16, -24);
|
||||
|
@ -38,6 +41,7 @@ void SP_misc_q1_zombie_crucified (edict_t *self)
|
|||
self->s.frame = 192;
|
||||
|
||||
self->common_name = "Crucified Zombie";
|
||||
self->class_id = ENTITY_MISC_Q1_ZOMBIE_CRUCIFIED;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
@ -157,6 +161,7 @@ void make_bubbles (edict_t *self)
|
|||
bubble->count = 0;
|
||||
|
||||
bubble->common_name = "Bubble";
|
||||
bubble->class_id = ENTITY_Q1_BUBBLE;
|
||||
|
||||
gi.linkentity (bubble);
|
||||
|
||||
|
@ -174,6 +179,9 @@ void SP_misc_q1_air_bubbles (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_MISC_Q1_BUBBLE_SPAWNER;
|
||||
|
||||
gi.modelindex ("sprites/s_bubble.sp2");
|
||||
self->nextthink = level.time + 1;
|
||||
self->think = make_bubbles;
|
||||
|
@ -197,6 +205,7 @@ void SP_misc_q1_globe(edict_t *self)
|
|||
self->s.sound = 0;
|
||||
|
||||
self->common_name = "Globe Light";
|
||||
self->class_id = ENTITY_MISC_Q1_GLOBE;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
@ -230,6 +239,7 @@ void SP_misc_q1_small_flame (edict_t *ent)
|
|||
ent->think = q1_small_flame_think;
|
||||
|
||||
ent->common_name = "Small Flame";
|
||||
ent->class_id = ENTITY_MISC_Q1_FLAME_SMALL;
|
||||
|
||||
gi.linkentity (ent);
|
||||
}
|
||||
|
@ -264,6 +274,7 @@ void SP_misc_q1_large_flame (edict_t *ent)
|
|||
ent->s.renderfx = RF_FULLBRIGHT | RF_NOSHADOW;
|
||||
|
||||
ent->common_name = "Large Flame";
|
||||
ent->class_id = ENTITY_MISC_Q1_FLAME_LARGE;
|
||||
|
||||
gi.linkentity (ent);
|
||||
}
|
||||
|
@ -297,6 +308,7 @@ void SP_misc_q1_torch (edict_t *ent)
|
|||
ent->think = q1_torch_think;
|
||||
|
||||
ent->common_name = "Torch";
|
||||
ent->class_id = ENTITY_MISC_Q1_TORCH;
|
||||
|
||||
gi.linkentity (ent);
|
||||
}
|
||||
|
@ -335,9 +347,12 @@ damage 9 for spike, 15 for superspike, 15 for laser
|
|||
*/
|
||||
void SP_target_q1_trap (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_Q1_TRAPSHOOTER;
|
||||
|
||||
self->use = q1_use_target_trapshooter;
|
||||
G_SetMovedir (self->s.angles, self->movedir);
|
||||
if (self->spawnflags & 2) {
|
||||
if (self->spawnflags & 2)
|
||||
{
|
||||
self->noise_index = gi.soundindex ("q1enforcer/enfire.wav");
|
||||
gi.soundindex("q1enforcer/enfstop.wav");
|
||||
if (!self->speed)
|
||||
|
@ -488,6 +503,10 @@ model="models/objects/q1explo/big/"
|
|||
*/
|
||||
void SP_misc_q1_explobox (edict_t *self)
|
||||
{
|
||||
// precache
|
||||
gi.modelindex ("sprites/s_explod.sp2");
|
||||
gi.soundindex ("q1weap/rocket/r_exp3.wav");
|
||||
|
||||
self->solid = SOLID_BBOX;
|
||||
//self->solid = SOLID_NOT;
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
|
@ -523,6 +542,7 @@ void SP_misc_q1_explobox (edict_t *self)
|
|||
self->nextthink = level.time + 2 * FRAMETIME;
|
||||
|
||||
self->common_name = "Exploding Box";
|
||||
self->class_id = ENTITY_MISC_Q1_EXPLOBOX;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
@ -571,6 +591,7 @@ void q1_fireball_fly (edict_t *self)
|
|||
lavaball->classname = "lavaball";
|
||||
|
||||
lavaball->common_name = "Lavaball";
|
||||
lavaball->class_id = ENTITY_Q1_FIREBALL;
|
||||
|
||||
gi.linkentity (lavaball);
|
||||
|
||||
|
@ -583,12 +604,15 @@ model="models/monsters/q1chthon/lavaball/"
|
|||
*/
|
||||
void SP_misc_q1_fireball (edict_t *self)
|
||||
{
|
||||
// precache
|
||||
gi.modelindex ("models/monsters/q1chthon/lavaball/tris.md2");
|
||||
|
||||
self->nextthink = level.time + (4 + (random() * 3.0));
|
||||
self->think = q1_fireball_fly;
|
||||
self->classname = "fireball";
|
||||
|
||||
self->common_name = "Lavaball Spawner";
|
||||
self->class_id = ENTITY_MISC_Q1_FIREBALL_SPAWNER;
|
||||
|
||||
gi.linkentity(self);
|
||||
}
|
||||
|
|
|
@ -1099,6 +1099,8 @@ void SP_hint_path (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_HINT_PATH;
|
||||
|
||||
// Lazarus: Corrections for mappers that can't follow instructions :-)
|
||||
if (!self->targetname)
|
||||
self->spawnflags |= HINT_ENDPOINT;
|
||||
|
|
|
@ -361,6 +361,7 @@ void fire_doppleganger (edict_t *ent, vec3_t start, vec3_t aimdir)
|
|||
base->think = doppleganger_timeout;
|
||||
|
||||
base->classname = "doppleganger";
|
||||
base->class_id = ENTITY_DOPPLEGANGER;
|
||||
|
||||
gi.linkentity (base);
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ void fd_secret_done (edict_t *self)
|
|||
if (!self->targetname || self->spawnflags & SEC_YES_SHOOT)
|
||||
{
|
||||
// self->health = 1;
|
||||
self->health = self->max_health;
|
||||
self->health = self->max_health; // Knightmare- restore max health
|
||||
self->takedamage = DAMAGE_YES;
|
||||
self->die = fd_secret_killed;
|
||||
}
|
||||
|
@ -239,8 +239,8 @@ void secret_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *s
|
|||
{
|
||||
gi.centerprintf (other, self->message);
|
||||
gi.sound (other, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
|
||||
// fixme - put this sound back??
|
||||
// gi.sound (other, CHAN_BODY, "misc/talk.wav", 1, ATTN_NORM);
|
||||
// fixme - put this sound back??
|
||||
// gi.sound (other, CHAN_BODY, "misc/talk.wav", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,14 +290,17 @@ void SP_func_door_secret2 (edict_t *ent)
|
|||
ent->moveinfo.sound_end = 0;
|
||||
}
|
||||
|
||||
if (ent->attenuation <= 0)
|
||||
ent->attenuation = ATTN_STATIC;
|
||||
|
||||
if (!ent->dmg)
|
||||
ent->dmg = 2;
|
||||
|
||||
AngleVectors(ent->s.angles, forward, right, up);
|
||||
VectorCopy(ent->s.origin, ent->pos0);
|
||||
VectorCopy(ent->s.angles, ent->move_angles);
|
||||
|
||||
AngleVectors (ent->s.angles, forward, right, up);
|
||||
VectorCopy (ent->s.origin, ent->pos0);
|
||||
VectorCopy (ent->s.angles, ent->move_angles);
|
||||
G_SetMovedir (ent->s.angles, ent->movedir);
|
||||
|
||||
ent->movetype = MOVETYPE_PUSH;
|
||||
ent->solid = SOLID_BSP;
|
||||
gi.setmodel (ent, ent->model);
|
||||
|
@ -321,24 +324,24 @@ void SP_func_door_secret2 (edict_t *ent)
|
|||
}
|
||||
|
||||
if (ent->spawnflags & SEC_MOVE_FORWARD)
|
||||
VectorScale(forward, ent->length, forward);
|
||||
VectorScale (forward, ent->length, forward);
|
||||
else
|
||||
VectorScale(forward, ent->length * -1 , forward);
|
||||
VectorScale (forward, ent->length * -1 , forward);
|
||||
|
||||
if (ent->spawnflags & SEC_MOVE_RIGHT)
|
||||
VectorScale(right, ent->width, right);
|
||||
VectorScale (right, ent->width, right);
|
||||
else
|
||||
VectorScale(right, ent->width * -1, right);
|
||||
VectorScale (right, ent->width * -1, right);
|
||||
|
||||
if (ent->spawnflags & SEC_1ST_DOWN)
|
||||
{
|
||||
VectorAdd(ent->s.origin, forward, ent->pos1); // was ent->moveinfo.start_origin
|
||||
VectorAdd(ent->pos1, right, ent->pos2); // was ent->moveinfo.end_origin
|
||||
VectorAdd (ent->s.origin, forward, ent->pos1); // was ent->moveinfo.start_origin
|
||||
VectorAdd (ent->pos1, right, ent->pos2); // was ent->moveinfo.end_origin
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorAdd(ent->s.origin, right, ent->pos1); // was ent->moveinfo.start_origin
|
||||
VectorAdd(ent->pos1, forward, ent->pos2); // was ent->moveinfo.end_origin
|
||||
VectorAdd (ent->s.origin, right, ent->pos1); // was ent->moveinfo.start_origin
|
||||
VectorAdd (ent->pos1, forward, ent->pos2); // was ent->moveinfo.end_origin
|
||||
}
|
||||
|
||||
ent->touch = secret_touch;
|
||||
|
@ -355,13 +358,13 @@ void SP_func_door_secret2 (edict_t *ent)
|
|||
if (!ent->health) {
|
||||
ent->health = 1;
|
||||
}
|
||||
ent->max_health = ent->health;
|
||||
ent->max_health = ent->health; // Knightmare- store health value
|
||||
ent->takedamage = DAMAGE_YES;
|
||||
ent->die = fd_secret_killed;
|
||||
}
|
||||
if (!ent->wait)
|
||||
ent->wait = 5; // 5 seconds before closing
|
||||
ent->postthink = train_move_children; //Knightmare- now supports movewith
|
||||
ent->postthink = train_move_children; // Knightmare- now supports movewith
|
||||
|
||||
gi.linkentity(ent);
|
||||
}
|
||||
|
@ -383,7 +386,7 @@ void force_wall_think(edict_t *self)
|
|||
}
|
||||
|
||||
self->think = force_wall_think;
|
||||
self->nextthink = level.time + 0.1;
|
||||
self->nextthink = level.time + FRAMETIME;
|
||||
}
|
||||
|
||||
void force_wall_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
|
@ -516,7 +519,9 @@ void SP_func_dm_wall (edict_t *self)
|
|||
{
|
||||
qboolean spawn = false;
|
||||
|
||||
//if it was lower than this something went very wrong.
|
||||
self->class_id = ENTITY_FUNC_DM_WALL;
|
||||
|
||||
// if it was lower than this something went very wrong.
|
||||
if (self->count > 2)
|
||||
{
|
||||
if (self->count > game.maxclients)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -33,7 +33,7 @@ NO_EFFECTS: will not give a teleport effect when touched
|
|||
SOUND: play a custom sound when touched
|
||||
"noise" (path/file.wav)
|
||||
*/
|
||||
void trigger_teleport_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||
void trigger_teleport_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||
{
|
||||
edict_t *dest;
|
||||
edict_t *tempent; //for teleport effect
|
||||
|
@ -43,15 +43,15 @@ void trigger_teleport_touch(edict_t *self, edict_t *other, cplane_t *plane, csur
|
|||
tempent = G_Spawn();
|
||||
VectorCopy (other->s.origin, tempent->s.origin);
|
||||
|
||||
if((self->spawnflags & TELEPORT_PLAYER_ONLY) && !(other->client))
|
||||
if ((self->spawnflags & TELEPORT_PLAYER_ONLY) && !(other->client))
|
||||
return;
|
||||
if(!other->client && (!other->svflags & SVF_MONSTER))
|
||||
if (!other->client && (!other->svflags & SVF_MONSTER))
|
||||
return;
|
||||
if(self->delay)
|
||||
if (self->delay)
|
||||
return;
|
||||
|
||||
dest = G_Find (NULL, FOFS(targetname), self->target);
|
||||
if(!dest)
|
||||
if (!dest)
|
||||
{
|
||||
gi.dprintf("Teleport Destination not found!\n");
|
||||
return;
|
||||
|
@ -75,7 +75,7 @@ void trigger_teleport_touch(edict_t *self, edict_t *other, cplane_t *plane, csur
|
|||
|
||||
// clear the velocity and hold them in place briefly
|
||||
VectorClear (other->velocity);
|
||||
if(other->client)
|
||||
if (other->client)
|
||||
{
|
||||
other->client->ps.pmove.pm_time = 160>>3; // hold time
|
||||
other->client->ps.pmove.pm_flags |= PMF_TIME_TELEPORT;
|
||||
|
@ -107,7 +107,7 @@ void trigger_teleport_touch(edict_t *self, edict_t *other, cplane_t *plane, csur
|
|||
|
||||
void trigger_teleport_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
if(self->solid == SOLID_NOT)
|
||||
if (self->solid == SOLID_NOT)
|
||||
self->solid = SOLID_TRIGGER;
|
||||
else
|
||||
self->solid = SOLID_NOT;
|
||||
|
@ -138,7 +138,7 @@ void SP_trigger_teleport (edict_t *self)
|
|||
if (self->targetname)
|
||||
{
|
||||
self->use = trigger_teleport_use;
|
||||
if(!(self->spawnflags & TELEPORT_START_ON))
|
||||
if (!(self->spawnflags & TELEPORT_START_ON))
|
||||
self->delay = 1;
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,9 @@ void SP_trigger_teleport (edict_t *self)
|
|||
G_SetMovedir (self->s.angles, self->movedir);
|
||||
|
||||
gi.setmodel (self, self->model);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_TELEPORT;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
||||
|
@ -174,7 +177,7 @@ void trigger_disguise_touch(edict_t *self, edict_t *other, cplane_t *plane, csur
|
|||
{
|
||||
if (other->client)
|
||||
{
|
||||
if(self->spawnflags & 4)
|
||||
if (self->spawnflags & 4)
|
||||
other->flags &= ~FL_DISGUISED;
|
||||
else
|
||||
other->flags |= FL_DISGUISED;
|
||||
|
@ -183,7 +186,7 @@ void trigger_disguise_touch(edict_t *self, edict_t *other, cplane_t *plane, csur
|
|||
|
||||
void trigger_disguise_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
if(self->solid == SOLID_NOT)
|
||||
if (self->solid == SOLID_NOT)
|
||||
self->solid = SOLID_TRIGGER;
|
||||
else
|
||||
self->solid = SOLID_NOT;
|
||||
|
@ -193,7 +196,9 @@ void trigger_disguise_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_trigger_disguise (edict_t *self)
|
||||
{
|
||||
if(self->spawnflags & 2)
|
||||
self->class_id = ENTITY_TRIGGER_DISGUISE;
|
||||
|
||||
if (self->spawnflags & 2)
|
||||
self->solid = SOLID_TRIGGER;
|
||||
else
|
||||
self->solid = SOLID_NOT;
|
||||
|
|
|
@ -78,6 +78,7 @@ void fire_flechette (edict_t *self, vec3_t start, vec3_t dir, int damage, int sp
|
|||
|
||||
flechette = G_Spawn();
|
||||
flechette->classname = "flechette";
|
||||
flechette->class_id = ENTITY_FLECHETTE;
|
||||
VectorCopy (start, flechette->s.origin);
|
||||
VectorCopy (start, flechette->s.old_origin);
|
||||
vectoangles2 (dir, flechette->s.angles);
|
||||
|
@ -555,7 +556,7 @@ void prox_land (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
|
|||
Prox_Explode(ent);
|
||||
return;
|
||||
}
|
||||
//Knightmare- stick to bmodels
|
||||
// Knightmare- stick to bmodels
|
||||
if (other->solid == SOLID_BSP && other->movetype != MOVETYPE_CONVEYOR
|
||||
&& (other->movetype == MOVETYPE_PUSH || other->movetype == MOVETYPE_PUSHABLE))
|
||||
{
|
||||
|
@ -712,6 +713,7 @@ void fire_prox (edict_t *self, vec3_t start, vec3_t aimdir, int damage_multiplie
|
|||
prox->think = Prox_Explode;
|
||||
prox->dmg = sk_prox_damage->value*damage_multiplier;
|
||||
prox->classname = "prox";
|
||||
prox->class_id = ENTITY_MINE_PROX;
|
||||
prox->svflags |= SVF_DAMAGEABLE;
|
||||
prox->flags |= FL_MECHANICAL;
|
||||
|
||||
|
@ -1622,19 +1624,19 @@ void Nuke_Think(edict_t *ent)
|
|||
|
||||
if ((ent->wait - level.time) <= (sk_nuke_life->value/2.0))
|
||||
{
|
||||
// ent->s.sound = gi.soundindex ("weapons/nukewarn.wav");
|
||||
// gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
// ent->s.sound = gi.soundindex ("weapons/nukewarn.wav");
|
||||
// gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, attenuation, 0);
|
||||
// gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
// gi.dprintf ("time %2.2f\n", ent->wait-level.time);
|
||||
// gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
// gi.dprintf ("time %2.2f\n", ent->wait-level.time);
|
||||
ent->timestamp = level.time + 0.3;
|
||||
}
|
||||
else
|
||||
{
|
||||
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, attenuation, 0);
|
||||
// gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
// gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
ent->timestamp = level.time + 0.5;
|
||||
// gi.dprintf ("time %2.2f\n", ent->wait-level.time);
|
||||
// gi.dprintf ("time %2.2f\n", ent->wait-level.time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1643,8 +1645,8 @@ void Nuke_Think(edict_t *ent)
|
|||
if (ent->timestamp <= level.time)
|
||||
{
|
||||
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, attenuation, 0);
|
||||
// gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
// gi.dprintf ("time %2.2f\n", ent->wait-level.time);
|
||||
// gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/nukewarn2.wav"), 1, ATTN_NORM, 0);
|
||||
// gi.dprintf ("time %2.2f\n", ent->wait-level.time);
|
||||
ent->timestamp = level.time + 1.0;
|
||||
}
|
||||
ent->nextthink = level.time + FRAMETIME;
|
||||
|
@ -1711,6 +1713,7 @@ void fire_nuke (edict_t *self, vec3_t start, vec3_t aimdir, int speed)
|
|||
// gi.dprintf ("nuke modifier = %d, damage = %d, radius = %f\n", damage_modifier, nuke->dmg, nuke->dmg_radius);
|
||||
|
||||
nuke->classname = "nuke";
|
||||
nuke->class_id = ENTITY_NUKE;
|
||||
nuke->die = nuke_die;
|
||||
|
||||
gi.linkentity (nuke);
|
||||
|
@ -1954,6 +1957,7 @@ void fire_nbomb (edict_t *self, vec3_t start, vec3_t aimdir, int speed)
|
|||
// gi.dprintf ("nbomb modifier = %d, damage = %d, radius = %f\n", damage_modifier, nbomb->dmg, nbomb->dmg_radius);
|
||||
|
||||
nbomb->classname = "nbomb";
|
||||
nbomb->class_id = ENTITY_NBOMB;
|
||||
nbomb->die = nbomb_die;
|
||||
|
||||
gi.linkentity (nbomb);
|
||||
|
@ -2304,6 +2308,7 @@ void fire_tesla (edict_t *self, vec3_t start, vec3_t aimdir, int damage_multipli
|
|||
tesla->dmg = sk_tesla_damage->value * damage_multiplier;
|
||||
// tesla->dmg = 0;
|
||||
tesla->classname = "tesla";
|
||||
tesla->class_id = ENTITY_MINE_TESLA;
|
||||
tesla->svflags |= SVF_DAMAGEABLE;
|
||||
tesla->clipmask = MASK_SHOT|CONTENTS_SLIME|CONTENTS_LAVA;
|
||||
tesla->flags |= FL_MECHANICAL;
|
||||
|
@ -2645,6 +2650,7 @@ void fire_blaster2 (edict_t *self, vec3_t start, vec3_t dir, int damage, int spe
|
|||
bolt->think = G_FreeEdict;
|
||||
bolt->dmg = damage;
|
||||
bolt->classname = "bolt2";
|
||||
bolt->class_id = ENTITY_BOLT2;
|
||||
gi.linkentity (bolt);
|
||||
|
||||
if (self->client)
|
||||
|
@ -2948,6 +2954,7 @@ void fire_tracker (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee
|
|||
tracker->owner = self;
|
||||
tracker->dmg = damage;
|
||||
tracker->classname = "tracker";
|
||||
tracker->class_id = ENTITY_TRACKER;
|
||||
gi.linkentity (tracker);
|
||||
|
||||
if (enemy)
|
||||
|
@ -3000,4 +3007,4 @@ void SP_tracker (edict_t *tracker)
|
|||
tracker->think = tracker_delayed_start;
|
||||
tracker->nextthink = level.time + FRAMETIME;
|
||||
gi.linkentity(tracker);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1401,6 +1401,9 @@ void SP_target_playback (edict_t *ent)
|
|||
G_FreeEdict(ent);
|
||||
return;
|
||||
}
|
||||
|
||||
ent->class_id = ENTITY_TARGET_PLAYBACK;
|
||||
|
||||
GameDirRelativePath(st.noise, filename, sizeof(filename));
|
||||
ent->message = gi.TagMalloc(strlen(filename)+1,TAG_LEVEL);
|
||||
strcpy(ent->message, filename);
|
||||
|
|
|
@ -1791,7 +1791,7 @@ void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
|
|||
|| !strcmp(ent->classname, "misc_banner") )
|
||||
ent->s.renderfx &= ~RF_IR_VISIBLE;
|
||||
|
||||
//David Hyde's code for the origin offset
|
||||
// David Hyde's code for the origin offset
|
||||
VectorAdd(ent->absmin, ent->absmax, ent->origin_offset);
|
||||
VectorScale(ent->origin_offset, 0.5, ent->origin_offset);
|
||||
VectorSubtract(ent->origin_offset, ent->s.origin, ent->origin_offset);
|
||||
|
|
|
@ -33,7 +33,7 @@ void hunter_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *s
|
|||
// =================
|
||||
void sphere_think_explode (edict_t *self)
|
||||
{
|
||||
if(self->owner && self->owner->client && !(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
if (self->owner && self->owner->client && !(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
{
|
||||
self->owner->client->owned_sphere = NULL;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ void sphere_think_explode (edict_t *self)
|
|||
// =================
|
||||
void sphere_explode (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
|
||||
{
|
||||
// if(self->owner && self->owner->client)
|
||||
// if (self->owner && self->owner->client)
|
||||
// gi.cprintf(self->owner, PRINT_HIGH, "Sphere timed out\n");
|
||||
// gi.dprintf("player died, blowing up\n");
|
||||
sphere_think_explode (self);
|
||||
|
@ -56,7 +56,7 @@ void sphere_explode (edict_t *self, edict_t *inflictor, edict_t *attacker, int d
|
|||
// =================
|
||||
void sphere_if_idle_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
|
||||
{
|
||||
if(!self->enemy)
|
||||
if (!self->enemy)
|
||||
{
|
||||
// gi.dprintf("player died, blowing up\n");
|
||||
sphere_think_explode(self);
|
||||
|
@ -74,7 +74,7 @@ void sphere_fly (edict_t *self)
|
|||
vec3_t dest;
|
||||
vec3_t dir;
|
||||
|
||||
if(level.time >= self->wait)
|
||||
if (level.time >= self->wait)
|
||||
{
|
||||
// gi.dprintf("fly: timed out\n");
|
||||
sphere_think_explode(self);
|
||||
|
@ -84,9 +84,9 @@ void sphere_fly (edict_t *self)
|
|||
VectorCopy (self->owner->s.origin, dest);
|
||||
dest[2] = self->owner->absmax[2] + 4;
|
||||
|
||||
if(level.time == (float)(int)level.time)
|
||||
if (level.time == (float)(int)level.time)
|
||||
{
|
||||
if(!visible(self, self->owner))
|
||||
if (!visible(self, self->owner))
|
||||
{
|
||||
VectorCopy(dest, self->s.origin);
|
||||
gi.linkentity(self);
|
||||
|
@ -106,20 +106,20 @@ void sphere_chase (edict_t *self, int stupidChase)
|
|||
vec3_t dir;
|
||||
float dist;
|
||||
|
||||
if(level.time >= self->wait || (self->enemy && self->enemy->health < 1))
|
||||
if (level.time >= self->wait || (self->enemy && self->enemy->health < 1))
|
||||
{
|
||||
sphere_think_explode(self);
|
||||
return;
|
||||
}
|
||||
|
||||
VectorCopy (self->enemy->s.origin, dest);
|
||||
if(self->enemy->client)
|
||||
if (self->enemy->client)
|
||||
dest[2] += self->enemy->viewheight;
|
||||
|
||||
if(visible(self, self->enemy) || stupidChase)
|
||||
if (visible(self, self->enemy) || stupidChase)
|
||||
{
|
||||
// if moving, hunter sphere uses active sound
|
||||
if(!stupidChase)
|
||||
if (!stupidChase)
|
||||
self->s.sound = gi.soundindex ("spheres/h_active.wav");
|
||||
|
||||
VectorSubtract (dest, self->s.origin, dir);
|
||||
|
@ -143,11 +143,11 @@ void sphere_chase (edict_t *self, int stupidChase)
|
|||
VectorSubtract(self->monsterinfo.saved_goal, self->s.origin, dir);
|
||||
dist = VectorNormalize(dir);
|
||||
|
||||
if(dist > 1)
|
||||
if (dist > 1)
|
||||
{
|
||||
vectoangles2(dir, self->s.angles);
|
||||
|
||||
if(dist > 500)
|
||||
if (dist > 500)
|
||||
VectorScale(dir, 500, self->velocity);
|
||||
else if (dist < 20)
|
||||
VectorScale(dir, (dist / FRAMETIME), self->velocity);
|
||||
|
@ -155,7 +155,7 @@ void sphere_chase (edict_t *self, int stupidChase)
|
|||
VectorScale(dir, dist, self->velocity);
|
||||
|
||||
// if moving, hunter sphere uses active sound
|
||||
if(!stupidChase)
|
||||
if (!stupidChase)
|
||||
self->s.sound = gi.soundindex ("spheres/h_active.wav");
|
||||
}
|
||||
else
|
||||
|
@ -165,7 +165,7 @@ void sphere_chase (edict_t *self, int stupidChase)
|
|||
vectoangles2(dir, self->s.angles);
|
||||
|
||||
// if not moving, hunter sphere uses lurk sound
|
||||
if(!stupidChase)
|
||||
if (!stupidChase)
|
||||
self->s.sound = gi.soundindex ("spheres/h_lurk.wav");
|
||||
|
||||
VectorClear(self->velocity);
|
||||
|
@ -184,7 +184,7 @@ void sphere_fire (edict_t *self, edict_t *enemy)
|
|||
vec3_t dest;
|
||||
vec3_t dir;
|
||||
|
||||
if(level.time >= self->wait || !enemy)
|
||||
if (level.time >= self->wait || !enemy)
|
||||
{
|
||||
sphere_think_explode(self);
|
||||
return;
|
||||
|
@ -207,7 +207,7 @@ void sphere_fire (edict_t *self, edict_t *enemy)
|
|||
// =================
|
||||
void sphere_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf, int mod)
|
||||
{
|
||||
if(self->spawnflags & SPHERE_DOPPLEGANGER)
|
||||
if (self->spawnflags & SPHERE_DOPPLEGANGER)
|
||||
{
|
||||
if (other == self->teammaster)
|
||||
return;
|
||||
|
@ -248,7 +248,7 @@ void sphere_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *s
|
|||
// =================
|
||||
void vengeance_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||
{
|
||||
if(self->spawnflags & SPHERE_DOPPLEGANGER)
|
||||
if (self->spawnflags & SPHERE_DOPPLEGANGER)
|
||||
sphere_touch (self, other, plane, surf, MOD_DOPPLE_VENGEANCE);
|
||||
else
|
||||
sphere_touch (self, other, plane, surf, MOD_VENGEANCE_SPHERE);
|
||||
|
@ -261,14 +261,14 @@ void hunter_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *s
|
|||
edict_t *owner;
|
||||
|
||||
// don't blow up if you hit the world.... sheesh.
|
||||
if(other==world)
|
||||
if (other==world)
|
||||
return;
|
||||
|
||||
if(self->owner)
|
||||
if (self->owner)
|
||||
{
|
||||
// if owner is flying with us, make sure they stop too.
|
||||
owner=self->owner;
|
||||
if(owner->flags & FL_SAM_RAIMI)
|
||||
if (owner->flags & FL_SAM_RAIMI)
|
||||
{
|
||||
VectorClear(owner->velocity);
|
||||
owner->movetype = MOVETYPE_NONE;
|
||||
|
@ -276,7 +276,7 @@ void hunter_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *s
|
|||
}
|
||||
}
|
||||
|
||||
if(self->spawnflags & SPHERE_DOPPLEGANGER)
|
||||
if (self->spawnflags & SPHERE_DOPPLEGANGER)
|
||||
sphere_touch (self, other, plane, surf, MOD_DOPPLE_HUNTER);
|
||||
else
|
||||
sphere_touch (self, other, plane, surf, MOD_HUNTER_SPHERE);
|
||||
|
@ -289,19 +289,19 @@ void defender_shoot (edict_t *self, edict_t *enemy)
|
|||
vec3_t dir;
|
||||
vec3_t start;
|
||||
|
||||
if(!(enemy->inuse) || enemy->health <= 0)
|
||||
if (!(enemy->inuse) || enemy->health <= 0)
|
||||
return;
|
||||
|
||||
if(enemy == self->owner)
|
||||
if (enemy == self->owner)
|
||||
return;
|
||||
|
||||
VectorSubtract (enemy->s.origin, self->s.origin, dir);
|
||||
VectorNormalize (dir);
|
||||
|
||||
if(self->monsterinfo.attack_finished > level.time)
|
||||
if (self->monsterinfo.attack_finished > level.time)
|
||||
return;
|
||||
|
||||
if(!visible(self, self->enemy))
|
||||
if (!visible(self, self->enemy))
|
||||
return;
|
||||
|
||||
VectorCopy(self->s.origin, start);
|
||||
|
@ -336,18 +336,18 @@ void hunter_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
float dist;
|
||||
vec3_t dir;
|
||||
|
||||
if(self->enemy)
|
||||
if (self->enemy)
|
||||
return;
|
||||
|
||||
owner = self->owner;
|
||||
|
||||
if(!(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
if (!(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
{
|
||||
if(owner && (owner->health > 0))
|
||||
if (owner && (owner->health > 0))
|
||||
return;
|
||||
|
||||
//PMM
|
||||
if(other == owner)
|
||||
if (other == owner)
|
||||
{
|
||||
// if ((g_showlogic) && (g_showlogic->value))
|
||||
// gi.dprintf ("hunter: won't get mad at my owner!\n");
|
||||
|
@ -361,34 +361,34 @@ void hunter_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
self->wait = level.time + MINIMUM_FLY_TIME;
|
||||
}
|
||||
|
||||
if((self->wait - level.time) < MINIMUM_FLY_TIME)
|
||||
if ((self->wait - level.time) < MINIMUM_FLY_TIME)
|
||||
self->wait = level.time + MINIMUM_FLY_TIME;
|
||||
self->s.effects |= EF_BLASTER | EF_TRACKER;
|
||||
self->touch = hunter_touch;
|
||||
self->enemy = other;
|
||||
|
||||
// if(g_showlogic && g_showlogic->value)
|
||||
// if (g_showlogic && g_showlogic->value)
|
||||
// gi.dprintf("hunter_pain: mad at %s\n", other->classname);
|
||||
|
||||
// if we're not owned by a player, no sam raimi
|
||||
// if we're spawned by a doppleganger, no sam raimi
|
||||
if((self->spawnflags & SPHERE_DOPPLEGANGER) || !(owner && owner->client))
|
||||
if ((self->spawnflags & SPHERE_DOPPLEGANGER) || !(owner && owner->client))
|
||||
return;
|
||||
|
||||
// sam raimi cam is disabled if FORCE_RESPAWN is set.
|
||||
// sam raimi cam is also disabled if huntercam->value is 0.
|
||||
if(!((int)dmflags->value & DF_FORCE_RESPAWN) && (huntercam && (huntercam->value)))
|
||||
if (!((int)dmflags->value & DF_FORCE_RESPAWN) && (huntercam && (huntercam->value)))
|
||||
{
|
||||
VectorSubtract(other->s.origin, self->s.origin, dir);
|
||||
dist=VectorLength(dir);
|
||||
|
||||
if(owner && (dist >= 192))
|
||||
if (owner && (dist >= 192))
|
||||
{
|
||||
// detach owner from body and send him flying
|
||||
owner->movetype = MOVETYPE_FLYMISSILE;
|
||||
|
||||
// gib like we just died, even though we didn't, really.
|
||||
body_gib(owner);
|
||||
body_gib (owner);
|
||||
|
||||
// move the sphere to the owner's current viewpoint.
|
||||
// we know it's a valid spot (or will be momentarily)
|
||||
|
@ -427,7 +427,7 @@ void hunter_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
void defender_pain (edict_t *self, edict_t *other, float kick, int damage)
|
||||
{
|
||||
//PMM
|
||||
if(other == self->owner)
|
||||
if (other == self->owner)
|
||||
{
|
||||
// if ((g_showlogic) && (g_showlogic->value))
|
||||
// gi.dprintf ("defender: won't get mad at my owner!\n");
|
||||
|
@ -441,16 +441,16 @@ void defender_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
// =================
|
||||
void vengeance_pain (edict_t *self, edict_t *other, float kick, int damage)
|
||||
{
|
||||
if(self->enemy)
|
||||
if (self->enemy)
|
||||
return;
|
||||
|
||||
if(!(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
if (!(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
{
|
||||
if(self->owner->health >= sk_vengeance_health_threshold->value)
|
||||
if (self->owner->health >= sk_vengeance_health_threshold->value)
|
||||
return;
|
||||
|
||||
//PMM
|
||||
if(other == self->owner)
|
||||
if (other == self->owner)
|
||||
{
|
||||
// if ((g_showlogic) && (g_showlogic->value))
|
||||
// gi.dprintf ("vengeance: won't get mad at my owner!\n");
|
||||
|
@ -463,7 +463,7 @@ void vengeance_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
self->wait = level.time + MINIMUM_FLY_TIME;
|
||||
}
|
||||
|
||||
if((self->wait - level.time) < MINIMUM_FLY_TIME)
|
||||
if ((self->wait - level.time) < MINIMUM_FLY_TIME)
|
||||
self->wait = level.time + MINIMUM_FLY_TIME;
|
||||
self->s.effects |= EF_ROCKET;
|
||||
self->touch = vengeance_touch;
|
||||
|
@ -478,7 +478,7 @@ void vengeance_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
// ===================
|
||||
void defender_think (edict_t *self)
|
||||
{
|
||||
if(!self->owner)
|
||||
if (!self->owner)
|
||||
{
|
||||
// gi.dprintf("think: no owner\n");
|
||||
G_FreeEdict(self);
|
||||
|
@ -492,25 +492,25 @@ void defender_think (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
if(self->owner->health <=0)
|
||||
if (self->owner->health <=0)
|
||||
{
|
||||
sphere_think_explode(self);
|
||||
return;
|
||||
}
|
||||
|
||||
// if(level.time - self->timestamp > 1)
|
||||
// if (level.time - self->timestamp > 1)
|
||||
// {
|
||||
// gi.sound (self, CHAN_VOICE, gi.soundindex ("powerup/dsphere.wav"), 0.6, ATTN_NORM, 0);
|
||||
// self->timestamp = level.time;
|
||||
// }
|
||||
|
||||
self->s.frame++;
|
||||
if(self->s.frame>19)
|
||||
if (self->s.frame>19)
|
||||
self->s.frame = 0;
|
||||
|
||||
if(self->enemy)
|
||||
if (self->enemy)
|
||||
{
|
||||
if(self->enemy->health > 0)
|
||||
if (self->enemy->health > 0)
|
||||
{
|
||||
// gi.dprintf( "shooting at %s\n", self->enemy->classname);
|
||||
defender_shoot (self, self->enemy);
|
||||
|
@ -526,7 +526,7 @@ void defender_think (edict_t *self)
|
|||
|
||||
sphere_fly (self);
|
||||
|
||||
if(self->inuse)
|
||||
if (self->inuse)
|
||||
self->nextthink = level.time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -545,16 +545,16 @@ void hunter_think (edict_t *self)
|
|||
}
|
||||
|
||||
owner = self->owner;
|
||||
if(!owner && !(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
if (!owner && !(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
{
|
||||
// gi.dprintf("think: no owner\n");
|
||||
G_FreeEdict(self);
|
||||
return;
|
||||
}
|
||||
|
||||
if(owner)
|
||||
if (owner)
|
||||
self->ideal_yaw = owner->s.angles[YAW];
|
||||
else if(self->enemy) // fired by doppleganger
|
||||
else if (self->enemy) // fired by doppleganger
|
||||
{
|
||||
VectorSubtract(self->enemy->s.origin, self->s.origin, dir);
|
||||
vectoangles2(dir, ang);
|
||||
|
@ -563,20 +563,20 @@ void hunter_think (edict_t *self)
|
|||
|
||||
M_ChangeYaw(self);
|
||||
|
||||
// if(level.time - self->timestamp > 1)
|
||||
// if (level.time - self->timestamp > 1)
|
||||
// {
|
||||
// gi.sound (self, CHAN_VOICE, gi.soundindex ("powerup/hsphere.wav"), 0.5, ATTN_NORM, 0);
|
||||
// self->timestamp = level.time;
|
||||
// }
|
||||
|
||||
if(self->enemy)
|
||||
if (self->enemy)
|
||||
{
|
||||
sphere_chase (self, 0);
|
||||
|
||||
// deal with sam raimi cam
|
||||
if(owner && (owner->flags & FL_SAM_RAIMI))
|
||||
if (owner && (owner->flags & FL_SAM_RAIMI))
|
||||
{
|
||||
if(self->inuse)
|
||||
if (self->inuse)
|
||||
{
|
||||
owner->movetype = MOVETYPE_FLYMISSILE;
|
||||
// VectorCopy(self->s.angles, owner->s.angles);
|
||||
|
@ -611,7 +611,7 @@ void hunter_think (edict_t *self)
|
|||
sphere_fly (self);
|
||||
}
|
||||
|
||||
if(self->inuse)
|
||||
if (self->inuse)
|
||||
self->nextthink = level.time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -626,20 +626,20 @@ void vengeance_think (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!(self->owner) && !(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
if (!(self->owner) && !(self->spawnflags & SPHERE_DOPPLEGANGER))
|
||||
{
|
||||
// gi.dprintf("think: no owner\n");
|
||||
G_FreeEdict(self);
|
||||
return;
|
||||
}
|
||||
|
||||
// if(level.time - self->timestamp > 1)
|
||||
// if (level.time - self->timestamp > 1)
|
||||
// {
|
||||
// gi.sound (self, CHAN_VOICE, gi.soundindex ("powerup/vsphere.wav"), 0.5, ATTN_NORM, 0);
|
||||
// self->timestamp = level.time;
|
||||
// }
|
||||
|
||||
if(self->enemy)
|
||||
if (self->enemy)
|
||||
{
|
||||
// sphere_fire (self, self->owner->enemy);
|
||||
sphere_chase (self, 1);
|
||||
|
@ -647,7 +647,7 @@ void vengeance_think (edict_t *self)
|
|||
else
|
||||
sphere_fly (self);
|
||||
|
||||
if(self->inuse)
|
||||
if (self->inuse)
|
||||
self->nextthink = level.time + 0.1;
|
||||
}
|
||||
|
||||
|
@ -671,7 +671,7 @@ edict_t *Sphere_Spawn (edict_t *owner, int spawnflags)
|
|||
sphere->s.renderfx = RF_FULLBRIGHT | RF_IR_VISIBLE;
|
||||
sphere->movetype = MOVETYPE_FLYMISSILE;
|
||||
|
||||
if(spawnflags & SPHERE_DOPPLEGANGER)
|
||||
if (spawnflags & SPHERE_DOPPLEGANGER)
|
||||
sphere->teammaster = owner->teammaster;
|
||||
else
|
||||
sphere->owner = owner;
|
||||
|
@ -686,6 +686,7 @@ edict_t *Sphere_Spawn (edict_t *owner, int spawnflags)
|
|||
switch(spawnflags & SPHERE_TYPE)
|
||||
{
|
||||
case SPHERE_DEFENDER:
|
||||
sphere->class_id = ENTITY_SPHERE_DEFENDER;
|
||||
sphere->s.modelindex = gi.modelindex("models/items/defender/tris.md2");
|
||||
sphere->s.modelindex2 = gi.modelindex("models/items/shell/tris.md2");
|
||||
sphere->s.sound = gi.soundindex ("spheres/d_idle.wav");
|
||||
|
@ -695,6 +696,7 @@ edict_t *Sphere_Spawn (edict_t *owner, int spawnflags)
|
|||
sphere->think = defender_think;
|
||||
break;
|
||||
case SPHERE_HUNTER:
|
||||
sphere->class_id = ENTITY_SPHERE_HUNTER;
|
||||
sphere->s.modelindex = gi.modelindex("models/items/hunter/tris.md2");
|
||||
sphere->s.sound = gi.soundindex ("spheres/h_idle.wav");
|
||||
sphere->wait = level.time + sk_hunter_time->value;
|
||||
|
@ -703,6 +705,7 @@ edict_t *Sphere_Spawn (edict_t *owner, int spawnflags)
|
|||
sphere->think = hunter_think;
|
||||
break;
|
||||
case SPHERE_VENGEANCE:
|
||||
sphere->class_id = ENTITY_SPHERE_VENGEANCE;
|
||||
sphere->s.modelindex = gi.modelindex("models/items/vengnce/tris.md2");
|
||||
sphere->s.sound = gi.soundindex ("spheres/v_idle.wav");
|
||||
sphere->wait = level.time + sk_vengeance_time->value;
|
||||
|
@ -730,21 +733,21 @@ edict_t *Sphere_Spawn (edict_t *owner, int spawnflags)
|
|||
// =================
|
||||
void Own_Sphere (edict_t *self, edict_t *sphere)
|
||||
{
|
||||
if(!sphere)
|
||||
if (!sphere)
|
||||
return;
|
||||
|
||||
// ownership only for players
|
||||
if(self->client)
|
||||
if (self->client)
|
||||
{
|
||||
// if they don't have one
|
||||
if(!(self->client->owned_sphere))
|
||||
if (!(self->client->owned_sphere))
|
||||
{
|
||||
self->client->owned_sphere = sphere;
|
||||
}
|
||||
// they already have one, take care of the old one
|
||||
else
|
||||
{
|
||||
if(self->client->owned_sphere->inuse)
|
||||
if (self->client->owned_sphere->inuse)
|
||||
{
|
||||
G_FreeEdict(self->client->owned_sphere);
|
||||
self->client->owned_sphere = sphere;
|
||||
|
|
|
@ -14,6 +14,8 @@ void Use_Target_Tent (edict_t *ent, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_temp_entity (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_TARGET_TEMP_ENTITY;
|
||||
|
||||
ent->use = Use_Target_Tent;
|
||||
}
|
||||
|
||||
|
@ -88,6 +90,8 @@ void Use_Target_Speaker (edict_t *ent, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_speaker (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_TARGET_SPEAKER;
|
||||
|
||||
if (!(ent->spawnflags & 8))
|
||||
{
|
||||
if (!st.noise)
|
||||
|
@ -109,7 +113,6 @@ void SP_target_speaker (edict_t *ent)
|
|||
strcpy(ent->message,st.noise);
|
||||
}
|
||||
}
|
||||
ent->class_id = ENTITY_TARGET_SPEAKER;
|
||||
|
||||
ent->noise_index = gi.soundindex (ent->message);
|
||||
ent->spawnflags &= ~8;
|
||||
|
@ -158,7 +161,7 @@ void Use_Target_Help (edict_t *ent, edict_t *other, edict_t *activator)
|
|||
/*QUAKED target_help (1 0 1) (-16 -16 -24) (16 16 24) help1
|
||||
When fired, the "message" key becomes the current personal computer string, and the message light will be set on all clients status bars.
|
||||
*/
|
||||
void SP_target_help(edict_t *ent)
|
||||
void SP_target_help (edict_t *ent)
|
||||
{
|
||||
if (deathmatch->value)
|
||||
{ // auto-remove for deathmatch
|
||||
|
@ -172,6 +175,9 @@ void SP_target_help(edict_t *ent)
|
|||
G_FreeEdict (ent);
|
||||
return;
|
||||
}
|
||||
|
||||
ent->class_id = ENTITY_TARGET_HELP;
|
||||
|
||||
ent->use = Use_Target_Help;
|
||||
}
|
||||
|
||||
|
@ -199,6 +205,8 @@ void SP_target_secret (edict_t *ent)
|
|||
return;
|
||||
}
|
||||
|
||||
ent->class_id = ENTITY_TARGET_SECRET;
|
||||
|
||||
ent->use = use_target_secret;
|
||||
if (!st.noise)
|
||||
st.noise = "misc/secret.wav";
|
||||
|
@ -237,6 +245,7 @@ void SP_target_goal (edict_t *ent)
|
|||
G_FreeEdict (ent);
|
||||
return;
|
||||
}
|
||||
ent->class_id = ENTITY_TARGET_GOAL;
|
||||
|
||||
ent->use = use_target_goal;
|
||||
if (!st.noise)
|
||||
|
@ -311,6 +320,8 @@ void use_target_explosion (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_explosion (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_TARGET_EXPLOSION;
|
||||
|
||||
ent->use = use_target_explosion;
|
||||
ent->svflags = SVF_NOCLIENT;
|
||||
}
|
||||
|
@ -504,6 +515,8 @@ void SP_target_changelevel (edict_t *ent)
|
|||
return;
|
||||
}
|
||||
|
||||
ent->class_id = ENTITY_TARGET_CHANGELEVEL;
|
||||
|
||||
if ((deathmatch->value || coop->value) && (ent->spawnflags & 2))
|
||||
{
|
||||
gi.dprintf("target_changelevel at %s\nLANDMARK only valid in single-player\n",
|
||||
|
@ -554,6 +567,8 @@ void use_target_splash (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_splash (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_SPLASH;
|
||||
|
||||
self->use = use_target_splash;
|
||||
G_SetMovedir (self->s.angles, self->movedir);
|
||||
|
||||
|
@ -611,6 +626,8 @@ void use_target_spawner (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_spawner (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_SPEAKER;
|
||||
|
||||
self->use = use_target_spawner;
|
||||
self->svflags = SVF_NOCLIENT;
|
||||
if (self->speed)
|
||||
|
@ -963,6 +980,8 @@ void SP_target_blaster (edict_t *self)
|
|||
self->use = use_target_blaster;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_TARGET_BLASTER;
|
||||
|
||||
gi.linkentity(self);
|
||||
self->svflags = SVF_NOCLIENT;
|
||||
}
|
||||
|
@ -981,6 +1000,8 @@ void trigger_crosslevel_trigger_use (edict_t *self, edict_t *other, edict_t *act
|
|||
|
||||
void SP_target_crosslevel_trigger (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_CROSSLEVEL_TRIGGER;
|
||||
|
||||
self->svflags = SVF_NOCLIENT;
|
||||
self->use = trigger_crosslevel_trigger_use;
|
||||
}
|
||||
|
@ -1002,6 +1023,8 @@ void target_crosslevel_target_think (edict_t *self)
|
|||
|
||||
void SP_target_crosslevel_target (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_CROSSLEVEL_TARGET;
|
||||
|
||||
if (! self->delay)
|
||||
self->delay = 1;
|
||||
self->svflags = SVF_NOCLIENT;
|
||||
|
@ -1858,6 +1881,8 @@ void target_lightramp_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_lightramp (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_LIGHTRAMP;
|
||||
|
||||
// DWH: CUSTOM spawnflag allows custom light switching, speed is ignored
|
||||
if (self->spawnflags & LIGHTRAMP_CUSTOM)
|
||||
{
|
||||
|
@ -1988,6 +2013,8 @@ void target_earthquake_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_target_earthquake (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TARGET_EARTHQUAKE;
|
||||
|
||||
if (!self->targetname)
|
||||
gi.dprintf("untargeted %s at %s\n", self->classname, vtos(self->s.origin));
|
||||
|
||||
|
|
|
@ -892,7 +892,7 @@ void tracktrain_think (edict_t *self)
|
|||
VectorClear (self->avelocity);
|
||||
self->nextthink = 0;
|
||||
// if (self->movewith_next && (self->movewith_next->movewith_ent == self))
|
||||
// set_child_movement(self);
|
||||
// set_child_movement (self);
|
||||
gi.linkentity(self);
|
||||
return;
|
||||
}
|
||||
|
@ -1015,7 +1015,7 @@ void tracktrain_think (edict_t *self)
|
|||
}
|
||||
}
|
||||
//if (self->movewith_next && (self->movewith_next->movewith_ent == self))
|
||||
// set_child_movement(self);
|
||||
// set_child_movement (self);
|
||||
|
||||
if ( (time < 1.5*FRAMETIME) && !(self->spawnflags & SF_TRACKTRAIN_DISABLED))
|
||||
self->think = tracktrain_reach_dest;
|
||||
|
@ -1801,7 +1801,7 @@ void func_tracktrain_find (edict_t *self)
|
|||
ent->enemy = self;
|
||||
ent->nextthink = level.time + FRAMETIME;
|
||||
|
||||
VectorCopy (self->s.origin, daoldorigin); //Knightmare- copy old orgin for reference
|
||||
VectorCopy (self->s.origin, daoldorigin); // Knightmare- copy old orgin for reference
|
||||
VectorCopy (ent->s.origin, self->s.origin);
|
||||
self->s.origin[2] += self->viewheight;
|
||||
|
||||
|
@ -1977,7 +1977,7 @@ void SP_func_tracktrain (edict_t *self)
|
|||
self->turn_rider = 1;
|
||||
VectorClear (self->s.angles);
|
||||
|
||||
self->postthink = train_move_children; //Knightmare- supports movewith
|
||||
self->postthink = train_move_children; // Knightmare- supports movewith
|
||||
|
||||
if (self->target)
|
||||
{
|
||||
|
|
|
@ -157,6 +157,8 @@ void trigger_enable (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_trigger_multiple (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_TRIGGER_MULTIPLE;
|
||||
|
||||
if (ent->sounds == 1)
|
||||
ent->noise_index = gi.soundindex ("misc/secret.wav");
|
||||
else if (ent->sounds == 2)
|
||||
|
@ -226,6 +228,8 @@ void SP_trigger_once(edict_t *ent)
|
|||
|
||||
ent->wait = -1;
|
||||
SP_trigger_multiple (ent);
|
||||
|
||||
ent->class_id = ENTITY_TRIGGER_ONCE;
|
||||
}
|
||||
|
||||
//Knightmare
|
||||
|
@ -284,7 +288,7 @@ count - how many times it can be used before being auto-killtargeted
|
|||
void trigger_relay_use (edict_t *self, edict_t *other, edict_t *activator)
|
||||
{
|
||||
G_UseTargets (self, activator);
|
||||
//Knightmare- decrement count and auto-killtarget
|
||||
// Knightmare- decrement count and auto-killtarget
|
||||
self->count--;
|
||||
if (self->count == 0)
|
||||
{
|
||||
|
@ -296,6 +300,8 @@ void trigger_relay_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_trigger_relay (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_RELAY;
|
||||
|
||||
// DWH - gives trigger_relay same message-displaying, sound-playing capabilities
|
||||
// as trigger_multiple and trigger_once
|
||||
if (self->sounds == 1)
|
||||
|
@ -306,6 +312,7 @@ void SP_trigger_relay (edict_t *self)
|
|||
self->noise_index = -1;
|
||||
if (!self->count) self->count=-1;
|
||||
// end DWH
|
||||
|
||||
self->use = trigger_relay_use;
|
||||
}
|
||||
|
||||
|
@ -474,11 +481,34 @@ void SP_trigger_key (edict_t *self)
|
|||
gi.dprintf("%s at %s has no target\n", self->classname, vtos(self->s.origin));
|
||||
return;
|
||||
}
|
||||
//Knightmare- don't load these sounds if it is silent
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_KEY;
|
||||
|
||||
// Knightmare- don't load these sounds if it is silent
|
||||
if (!(self->spawnflags & 4))
|
||||
{
|
||||
gi.soundindex ("misc/keytry.wav");
|
||||
gi.soundindex ("misc/keyuse.wav");
|
||||
int index;
|
||||
|
||||
index = ITEM_INDEX(self->item);
|
||||
if (self->item->flags & IT_Q1)
|
||||
{
|
||||
if (index == key_q1_med_gold_index || index == key_q1_med_silver_index) {
|
||||
gi.soundindex ("q1world/doors/medtry.wav");
|
||||
gi.soundindex ("q1world/doors/meduse.wav");
|
||||
}
|
||||
else if (index == key_q1_rune_gold_index || index == key_q1_rune_silver_index) {
|
||||
gi.soundindex ("q1world/doors/runetry.wav");
|
||||
gi.soundindex ("q1world/doors/runeuse.wav");
|
||||
}
|
||||
else if (index == key_q1_base_gold_index || index == key_q1_base_silver_index) {
|
||||
gi.soundindex ("q1world/doors/basetry.wav");
|
||||
gi.soundindex ("q1world/doors/baseuse.wav");
|
||||
}
|
||||
}
|
||||
else {
|
||||
gi.soundindex ("misc/keytry.wav");
|
||||
gi.soundindex ("misc/keyuse.wav");
|
||||
}
|
||||
}
|
||||
self->use = trigger_key_use;
|
||||
}
|
||||
|
@ -538,6 +568,8 @@ void trigger_counter_use (edict_t *self, edict_t *other, edict_t *activator)
|
|||
|
||||
void SP_trigger_counter (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_COUNTER;
|
||||
|
||||
self->wait = -1;
|
||||
if (!self->count)
|
||||
self->count = 2;
|
||||
|
@ -559,6 +591,8 @@ This trigger will always fire. It is activated by the world.
|
|||
*/
|
||||
void SP_trigger_always (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_TRIGGER_ALWAYS;
|
||||
|
||||
// we must have some delay to make sure our use targets are present
|
||||
if (ent->delay < 0.2)
|
||||
ent->delay = 0.2;
|
||||
|
@ -648,7 +682,10 @@ SILENT - Doesn't make wind noise
|
|||
|
||||
void SP_trigger_push (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_PUSH;
|
||||
|
||||
InitTrigger (self);
|
||||
|
||||
if (self->spawnflags & PUSH_CUSTOM_SND)
|
||||
{
|
||||
if (st.noise)
|
||||
|
@ -706,6 +743,7 @@ SILENT - Doesn't make wind noise
|
|||
void SP_trigger_push_bbox (edict_t *self)
|
||||
{
|
||||
InitTriggerBbox (self);
|
||||
|
||||
if (self->spawnflags & PUSH_CUSTOM_SND)
|
||||
{
|
||||
if (st.noise)
|
||||
|
@ -808,6 +846,8 @@ void hurt_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *sur
|
|||
|
||||
void SP_trigger_hurt (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_HURT;
|
||||
|
||||
InitTrigger (self);
|
||||
|
||||
self->noise_index = gi.soundindex ("world/electro.wav");
|
||||
|
@ -848,6 +888,8 @@ void SP_trigger_hurt_bbox (edict_t *self)
|
|||
{
|
||||
InitTriggerBbox (self);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_HURT;
|
||||
|
||||
self->noise_index = gi.soundindex ("world/electro.wav");
|
||||
self->touch = hurt_touch;
|
||||
|
||||
|
@ -905,9 +947,10 @@ void SP_trigger_gravity (edict_t *self)
|
|||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
|
||||
InitTrigger (self);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_GRAVITY;
|
||||
|
||||
//PGM
|
||||
// self->gravity = atoi(st.gravity);
|
||||
self->gravity = atof(st.gravity);
|
||||
|
@ -949,6 +992,8 @@ void SP_trigger_gravity_bbox (edict_t *self)
|
|||
|
||||
InitTriggerBbox (self);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_GRAVITY;
|
||||
|
||||
//PGM
|
||||
// self->gravity = atoi(st.gravity);
|
||||
self->gravity = atof(st.gravity);
|
||||
|
@ -1005,6 +1050,8 @@ void trigger_monsterjump_touch (edict_t *self, edict_t *other, cplane_t *plane,
|
|||
|
||||
void SP_trigger_monsterjump (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_MONSTERJUMP;
|
||||
|
||||
if (!self->speed)
|
||||
self->speed = 200;
|
||||
|
||||
|
@ -1014,13 +1061,17 @@ void SP_trigger_monsterjump (edict_t *self)
|
|||
st.height = 200;
|
||||
if (self->s.angles[YAW] == 0)
|
||||
self->s.angles[YAW] = 360;
|
||||
|
||||
InitTrigger (self);
|
||||
|
||||
self->touch = trigger_monsterjump_touch;
|
||||
self->movedir[2] = st.height;
|
||||
}
|
||||
|
||||
void SP_trigger_monsterjump_bbox (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_MONSTERJUMP;
|
||||
|
||||
if (!self->speed)
|
||||
self->speed = 200;
|
||||
if (self->height)
|
||||
|
@ -1060,6 +1111,8 @@ void trigger_mass_touch (edict_t *self, edict_t *other, cplane_t *plane, csurfac
|
|||
|
||||
void SP_trigger_mass (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_MASS;
|
||||
|
||||
// Fires its target if touched by an entity weighing at least
|
||||
// self->mass
|
||||
if (self->sounds == 1)
|
||||
|
@ -1107,6 +1160,8 @@ tright Max b-box coords XYZ. Default = 16 16 16
|
|||
|
||||
void SP_trigger_mass_bbox (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_TRIGGER_MASS;
|
||||
|
||||
// Fires its target if touched by an entity weighing at least
|
||||
// self->mass
|
||||
if (self->sounds == 1)
|
||||
|
@ -1194,6 +1249,9 @@ void SP_trigger_inside (edict_t *self)
|
|||
G_FreeEdict(self);
|
||||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_INSIDE;
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->svflags |= SVF_NOCLIENT;
|
||||
self->solid = SOLID_TRIGGER;
|
||||
|
@ -1238,6 +1296,8 @@ void SP_trigger_inside_bbox (edict_t *self)
|
|||
}
|
||||
InitTriggerBbox (self);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_INSIDE;
|
||||
|
||||
if (!self->wait)
|
||||
self->wait = 0.2;
|
||||
|
||||
|
@ -1250,7 +1310,7 @@ void SP_trigger_inside_bbox (edict_t *self)
|
|||
// TRIGGER_SCALES - coupled with target_characters, displays the weight of all
|
||||
// entities that are "standing on" the trigger.
|
||||
//==================================================================================
|
||||
float weight_on_top(edict_t *ent)
|
||||
float weight_on_top (edict_t *ent)
|
||||
{
|
||||
float weight;
|
||||
int i;
|
||||
|
@ -1324,6 +1384,8 @@ void SP_trigger_scales (edict_t *self)
|
|||
G_FreeEdict(self);
|
||||
return;
|
||||
}
|
||||
self->class_id = ENTITY_TRIGGER_SCALES;
|
||||
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->svflags |= SVF_NOCLIENT;
|
||||
self->solid = SOLID_TRIGGER;
|
||||
|
@ -1345,9 +1407,10 @@ void SP_trigger_scales_bbox (edict_t *self)
|
|||
G_FreeEdict(self);
|
||||
return;
|
||||
}
|
||||
|
||||
InitTriggerBbox (self);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_SCALES;
|
||||
|
||||
self->think = trigger_scales_think;
|
||||
self->nextthink = level.time + 1.0;
|
||||
self->mass = 0;
|
||||
|
@ -1494,6 +1557,8 @@ void SP_trigger_look (edict_t *self)
|
|||
{
|
||||
InitTriggerBbox (self);
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_LOOK;
|
||||
|
||||
if (self->sounds == 1)
|
||||
self->noise_index = gi.soundindex ("misc/secret.wav");
|
||||
else if (self->sounds == 2)
|
||||
|
@ -1570,6 +1635,9 @@ void SP_trigger_speaker (edict_t *self)
|
|||
gi.dprintf("trigger_speaker with no noise set at %s\n", vtos(self->s.origin));
|
||||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_SPEAKER;
|
||||
|
||||
if (!strstr (st.noise, ".wav"))
|
||||
Com_sprintf (buffer, sizeof(buffer), "%s.wav", st.noise);
|
||||
else
|
||||
|
@ -1603,7 +1671,7 @@ void SP_trigger_speaker (edict_t *self)
|
|||
//==============================================================================
|
||||
void WriteEdict (FILE *f, edict_t *ent);
|
||||
|
||||
qboolean HasSpawnFunction(edict_t *ent)
|
||||
qboolean HasSpawnFunction (edict_t *ent)
|
||||
{
|
||||
spawn_t *s;
|
||||
gitem_t *item;
|
||||
|
@ -1637,11 +1705,11 @@ void WriteTransitionEdict (FILE *f, edict_t *changelevel, edict_t *ent)
|
|||
void *p;
|
||||
|
||||
memcpy(&e,ent,sizeof(edict_t));
|
||||
if (!Q_stricmp(e.classname,"target_laser") ||
|
||||
!Q_stricmp(e.classname,"target_blaster") )
|
||||
if (!Q_stricmp(e.classname, "target_laser") ||
|
||||
!Q_stricmp(e.classname, "target_blaster") )
|
||||
vectoangles(e.movedir,e.s.angles);
|
||||
|
||||
if (!Q_stricmp(e.classname,"target_speaker"))
|
||||
if (!Q_stricmp(e.classname, "target_speaker"))
|
||||
e.spawnflags |= 8; // indicates that "message" contains noise
|
||||
|
||||
if (changelevel->s.angles[YAW])
|
||||
|
@ -1759,7 +1827,7 @@ entlist_t DoNotMove[] = {
|
|||
{"target_lock_digit"},
|
||||
{"target_rotation"},
|
||||
{"target_secret"},
|
||||
{"target_speaker"}, //Knightmare- don't move speakers
|
||||
{"target_speaker"}, // Knightmare- don't move speakers
|
||||
{"target_splash"},
|
||||
{"target_steam"},
|
||||
{"target_string"},
|
||||
|
@ -1936,6 +2004,8 @@ void SP_trigger_transition (edict_t *self)
|
|||
gi.dprintf("trigger_transition w/o a targetname\n");
|
||||
G_FreeEdict(self);
|
||||
}
|
||||
self->class_id = ENTITY_TRIGGER_TRANSITION;
|
||||
|
||||
self->solid = SOLID_NOT;
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
gi.setmodel (self, self->model);
|
||||
|
@ -1949,6 +2019,8 @@ void SP_trigger_transition_bbox (edict_t *self)
|
|||
gi.dprintf("trigger_transition_bbox w/o a targetname\n");
|
||||
G_FreeEdict(self);
|
||||
}
|
||||
self->class_id = ENTITY_TRIGGER_TRANSITION;
|
||||
|
||||
self->solid = SOLID_NOT;
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
if ( (!VectorLength(self->bleft)) && (!VectorLength(self->tright)) )
|
||||
|
@ -2073,7 +2145,7 @@ void trigger_switch_usetargets (edict_t *ent, edict_t *activator)
|
|||
case ENTITY_FUNC_FORCE_WALL:
|
||||
case ENTITY_FUNC_WALL:
|
||||
if (t->solid == SOLID_BSP)
|
||||
on=1;
|
||||
on = 1;
|
||||
break;
|
||||
case ENTITY_FUNC_PENDULUM:
|
||||
case ENTITY_FUNC_TRAIN:
|
||||
|
@ -2088,33 +2160,33 @@ void trigger_switch_usetargets (edict_t *ent, edict_t *activator)
|
|||
case ENTITY_TARGET_MAL_LASER:
|
||||
case ENTITY_TARGET_PRECIPITATION:
|
||||
if (t->spawnflags & 1)
|
||||
on=1;
|
||||
on = 1;
|
||||
break;
|
||||
case ENTITY_FUNC_REFLECT:
|
||||
if (!(t->spawnflags & 1))
|
||||
on=1;
|
||||
on = 1;
|
||||
break;
|
||||
case ENTITY_FUNC_ROTATING:
|
||||
on = VectorCompare (t->avelocity, vec3_origin);
|
||||
break;
|
||||
case ENTITY_FUNC_TIMER:
|
||||
if (t->nextthink)
|
||||
on=1;
|
||||
on = 1;
|
||||
break;
|
||||
case ENTITY_FUNC_TRACKTRAIN:
|
||||
if (!(t->spawnflags & 128))
|
||||
on=1;
|
||||
on = 1;
|
||||
break;
|
||||
case ENTITY_MODEL_TURRET:
|
||||
case ENTITY_TURRET_BREACH:
|
||||
if (t->spawnflags & 16)
|
||||
on=1;
|
||||
on = 1;
|
||||
break;
|
||||
case ENTITY_TARGET_EFFECT:
|
||||
if (t->spawnflags & 3)
|
||||
{
|
||||
if (t->spawnflags & 1)
|
||||
on=1;
|
||||
on = 1;
|
||||
}
|
||||
else
|
||||
on = -1;
|
||||
|
@ -2123,23 +2195,23 @@ void trigger_switch_usetargets (edict_t *ent, edict_t *activator)
|
|||
if (t->spawnflags & 3)
|
||||
{
|
||||
if (t->s.sound)
|
||||
on=1;
|
||||
on = 1;
|
||||
}
|
||||
else
|
||||
on=-1;
|
||||
on = -1;
|
||||
break;
|
||||
default:
|
||||
on=-1;
|
||||
on = -1;
|
||||
}
|
||||
|
||||
|
||||
if (ent->spawnflags & TRIGGER_TARGET_OFF)
|
||||
{
|
||||
// Only use target if it is currently ON
|
||||
if (on==1)
|
||||
if (on == 1)
|
||||
t->use (t, ent, activator);
|
||||
}
|
||||
else if (on==0)
|
||||
else if (on == 0)
|
||||
{
|
||||
// Only use target if it is currently OFF
|
||||
t->use (t, ent, activator);
|
||||
|
@ -2215,6 +2287,7 @@ void use_trigger_switch (edict_t *ent, edict_t *other, edict_t *activator)
|
|||
void SP_trigger_switch (edict_t *ent)
|
||||
{
|
||||
ent->class_id = ENTITY_TRIGGER_SWITCH;
|
||||
|
||||
if (ent->sounds == 1)
|
||||
ent->noise_index = gi.soundindex ("misc/secret.wav");
|
||||
else if (ent->sounds == 2)
|
||||
|
|
|
@ -1313,7 +1313,7 @@ void turret_breach_finish_init (edict_t *self)
|
|||
// Knightmare- if we've been moved by a func_train before initializing,
|
||||
// shift firing point by the distance moved
|
||||
if (VectorLength(self->aim_point))
|
||||
VectorAdd(self->move_origin, self->aim_point, self->move_origin);
|
||||
VectorAdd (self->move_origin, self->aim_point, self->move_origin);
|
||||
|
||||
G_FreeEdict(self->target_ent);
|
||||
|
||||
|
@ -1326,7 +1326,7 @@ void turret_breach_finish_init (edict_t *self)
|
|||
// Knightmare- if we've been moved by a func_train before initializing,
|
||||
// shift firing point by the distance moved
|
||||
if (VectorLength(self->aim_point))
|
||||
VectorAdd(self->muzzle2, self->aim_point, self->muzzle2);
|
||||
VectorAdd (self->muzzle2, self->aim_point, self->muzzle2);
|
||||
|
||||
self->moreflags |= FL2_TURRET_DOUBLE;
|
||||
if (self->style > 0)
|
||||
|
@ -2178,6 +2178,8 @@ void SP_turret_invisible_brain (edict_t *self)
|
|||
self->nextthink = level.time + FRAMETIME;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_TURRET_INVISIBLE_BRAIN;
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
|
|
@ -693,7 +693,22 @@ Marks the edict as free
|
|||
|
||||
void G_FreeEdict (edict_t *ed)
|
||||
{
|
||||
if (ed->speaker) //recursively remove train's speaker entity
|
||||
// Lazarus - if part of a movewith chain, remove from
|
||||
// the chain and repair broken links
|
||||
/* if (ed->movewith)
|
||||
{
|
||||
edict_t *e;
|
||||
edict_t *parent = NULL;
|
||||
int i;
|
||||
|
||||
for (i=1; i<globals.num_edicts && !parent; i++) {
|
||||
e = g_edicts + i;
|
||||
if (e->movewith_next == ed) parent = e;
|
||||
}
|
||||
if (parent) parent->movewith_next = ed->movewith_next;
|
||||
}*/
|
||||
|
||||
if (ed->speaker) // recursively remove train's speaker entity
|
||||
G_FreeEdict(ed->speaker);
|
||||
|
||||
// Knightmare- stop target_playback
|
||||
|
|
|
@ -411,7 +411,7 @@ void vehicle_think (edict_t *self)
|
|||
}
|
||||
}
|
||||
// if(self->movewith_next && (self->movewith_next->movewith_ent == self))
|
||||
// set_child_movement(self);
|
||||
// set_child_movement (self);
|
||||
}
|
||||
|
||||
void turn_vehicle (edict_t *self)
|
||||
|
@ -422,13 +422,16 @@ void turn_vehicle (edict_t *self)
|
|||
}
|
||||
void SP_func_vehicle (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_FUNC_VEHICLE;
|
||||
|
||||
self->ideal_yaw = self->s.angles[YAW];
|
||||
VectorClear (self->s.angles);
|
||||
self->solid = SOLID_BSP;
|
||||
gi.setmodel (self, self->model);
|
||||
|
||||
// usermodel (for alias model vehicles) goes on modelindex2
|
||||
if (self->usermodel && strlen(self->usermodel)) {
|
||||
if (self->usermodel && strlen(self->usermodel))
|
||||
{
|
||||
char modelname[256];
|
||||
// check for "models/" already in path
|
||||
if ( !strncmp(self->usermodel, "models/", 7) )
|
||||
|
@ -476,6 +479,7 @@ void SP_func_vehicle (edict_t *self)
|
|||
if (self->health) {
|
||||
self->die = func_vehicle_explode;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
} else
|
||||
}
|
||||
else
|
||||
self->takedamage = DAMAGE_NO;
|
||||
}
|
||||
|
|
|
@ -416,6 +416,7 @@ void fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee
|
|||
if (hyper)
|
||||
bolt->spawnflags = 1;
|
||||
bolt->classname = "bolt";
|
||||
bolt->class_id = ENTITY_BOLT;
|
||||
gi.linkentity (bolt);
|
||||
|
||||
if (self->client)
|
||||
|
@ -460,6 +461,7 @@ void fire_blueblaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int
|
|||
bolt->think = G_FreeEdict;
|
||||
bolt->dmg = damage;
|
||||
bolt->classname = "bolt";
|
||||
bolt->class_id = ENTITY_BOLT;
|
||||
gi.linkentity (bolt);
|
||||
|
||||
if (self->client)
|
||||
|
@ -609,7 +611,6 @@ void Grenade_Evade (edict_t *monster)
|
|||
}
|
||||
}
|
||||
|
||||
//static void Grenade_Explode (edict_t *ent)
|
||||
void Grenade_Explode (edict_t *ent)
|
||||
{
|
||||
vec3_t origin;
|
||||
|
@ -761,6 +762,7 @@ void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int s
|
|||
grenade->dmg = damage;
|
||||
grenade->dmg_radius = damage_radius;
|
||||
grenade->classname = "grenade";
|
||||
grenade->class_id = ENTITY_GRENADE;
|
||||
|
||||
gi.linkentity (grenade);
|
||||
}
|
||||
|
@ -801,6 +803,7 @@ void fire_grenade2 (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int
|
|||
grenade->dmg = damage;
|
||||
grenade->dmg_radius = damage_radius;
|
||||
grenade->classname = "hgrenade";
|
||||
grenade->class_id = ENTITY_HANDGRENADE;
|
||||
if (held)
|
||||
grenade->spawnflags = 3;
|
||||
else
|
||||
|
@ -1062,6 +1065,7 @@ void fire_missile (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee
|
|||
|
||||
missile->enemy = home_target;
|
||||
missile->classname = "homing rocket";
|
||||
missile->class_id = ENTITY_ROCKET;
|
||||
missile->nextthink = level.time + FRAMETIME;
|
||||
missile->think = homing_think;
|
||||
missile->starttime = level.time + 0.3; // play homing sound on 3rd frame
|
||||
|
@ -1076,6 +1080,7 @@ void fire_missile (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee
|
|||
else
|
||||
{
|
||||
missile->classname = "missile";
|
||||
missile->class_id = ENTITY_ROCKET;
|
||||
missile->nextthink = level.time + 8000.0f/speed;
|
||||
missile->think = G_FreeEdict;
|
||||
Rocket_Evade (missile, dir, speed);
|
||||
|
@ -1389,8 +1394,8 @@ void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
|
|||
vec3_t right, up;
|
||||
vec3_t lateral_speed;
|
||||
|
||||
AngleVectors(self->s.angles,NULL,right,up);
|
||||
VectorCopy(self->velocity,lateral_speed);
|
||||
AngleVectors (self->s.angles, NULL, right, up);
|
||||
VectorCopy (self->velocity, lateral_speed);
|
||||
lateral_speed[0] *= fabs(right[0]);
|
||||
lateral_speed[1] *= fabs(right[1]);
|
||||
lateral_speed[2] *= fabs(up[2]);
|
||||
|
@ -1420,6 +1425,7 @@ void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
|
|||
}
|
||||
else
|
||||
rocket->classname = "rocket";
|
||||
rocket->class_id = ENTITY_ROCKET;
|
||||
|
||||
rocket->owner = self;
|
||||
rocket->touch = rocket_touch;
|
||||
|
@ -1983,6 +1989,7 @@ void fire_ionripper (edict_t *self, vec3_t start, vec3_t dir, int damage, int sp
|
|||
|
||||
ion = G_Spawn ();
|
||||
ion->classname = "ion";
|
||||
ion->class_id = ENTITY_ION;
|
||||
VectorCopy (start, ion->s.origin);
|
||||
VectorCopy (start, ion->s.old_origin);
|
||||
vectoangles (dir, ion->s.angles);
|
||||
|
@ -1993,7 +2000,7 @@ void fire_ionripper (edict_t *self, vec3_t start, vec3_t dir, int damage, int sp
|
|||
ion->solid = SOLID_BBOX;
|
||||
ion->s.effects |= effect;
|
||||
|
||||
ion->s.renderfx |= RF_FULLBRIGHT | RF_NOSHADOW; //Knightmare- no shadow
|
||||
ion->s.renderfx |= RF_FULLBRIGHT | RF_NOSHADOW; // Knightmare- no shadow
|
||||
|
||||
VectorClear (ion->mins);
|
||||
VectorClear (ion->maxs);
|
||||
|
@ -2210,6 +2217,8 @@ void fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int damage, int
|
|||
edict_t *heat;
|
||||
|
||||
heat = G_Spawn();
|
||||
heat->classname = "rocket";
|
||||
heat->class_id = ENTITY_ROCKET;
|
||||
VectorCopy (start, heat->s.origin);
|
||||
VectorCopy (dir, heat->movedir);
|
||||
vectoangles (dir, heat->s.angles);
|
||||
|
@ -2293,6 +2302,7 @@ void fire_plasma (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
|
|||
|
||||
plasma = G_Spawn();
|
||||
plasma->classname = "plasma";
|
||||
plasma->class_id = ENTITY_PLASMA;
|
||||
VectorCopy (start, plasma->s.origin);
|
||||
VectorCopy (dir, plasma->movedir);
|
||||
vectoangles (dir, plasma->s.angles);
|
||||
|
@ -2651,6 +2661,7 @@ void fire_trap (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int spee
|
|||
trap->dmg = damage;
|
||||
trap->dmg_radius = damage_radius;
|
||||
trap->classname = "htrap";
|
||||
trap->class_id = ENTITY_TRAP;
|
||||
// RAFAEL 16-APR-98
|
||||
trap->s.sound = gi.soundindex ("weapons/traploop.wav");
|
||||
// END 16-APR-98
|
||||
|
@ -3295,6 +3306,7 @@ edict_t *Spawn_Goop (edict_t *ent, vec3_t start)
|
|||
|
||||
VectorCopy (start, goop->s.origin);
|
||||
goop->classname = "goop";
|
||||
goop->class_id = ENTITY_GOOP;
|
||||
|
||||
goop->s.effects |= EF_BLUEHYPERBLASTER | EF_ANIM_ALLFAST;
|
||||
// bat to get rid of the blue flag effect
|
||||
|
|
|
@ -100,6 +100,7 @@ void q1_fire_nail (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee
|
|||
nail->spawnflags = 1;
|
||||
|
||||
nail->common_name = "Nail";
|
||||
nail->class_id = ENTITY_Q1_NAIL;
|
||||
|
||||
gi.linkentity (nail);
|
||||
|
||||
|
@ -197,6 +198,7 @@ void q1_fire_laser (edict_t *self, vec3_t start, vec3_t dir, int damage, int spe
|
|||
laser->classname = "laser";
|
||||
|
||||
laser->common_name = "Laser";
|
||||
laser->class_id = ENTITY_Q1_LASER;
|
||||
|
||||
gi.linkentity (laser);
|
||||
|
||||
|
@ -309,6 +311,7 @@ void q1_fire_flame (edict_t *self, vec3_t start, vec3_t dir, float leftrightoff)
|
|||
bolt->classname = "bolt";
|
||||
|
||||
bolt->common_name = "Hell Knight Flame";
|
||||
bolt->class_id = ENTITY_Q1_HKNIGHT_FLAME;
|
||||
|
||||
gi.linkentity (bolt);
|
||||
|
||||
|
@ -441,6 +444,7 @@ void q1_fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, in
|
|||
grenade->classname = "grenade";
|
||||
|
||||
grenade->common_name = "Quake Grenade";
|
||||
grenade->class_id = ENTITY_Q1_GRENADE;
|
||||
|
||||
gi.linkentity (grenade);
|
||||
}
|
||||
|
@ -569,6 +573,7 @@ void q1_fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int sp
|
|||
q1rocket_trail (rocket, start, dir);
|
||||
|
||||
rocket->common_name = "Quake Rocket";
|
||||
rocket->class_id = ENTITY_Q1_ROCKET;
|
||||
|
||||
gi.linkentity (rocket);
|
||||
}
|
||||
|
@ -752,6 +757,7 @@ void q1_fire_firepod (edict_t *self, vec3_t dir)
|
|||
pod->owner = self;
|
||||
|
||||
pod->common_name = "Firepod";
|
||||
pod->class_id = ENTITY_Q1_FIREPOD;
|
||||
|
||||
gi.linkentity (pod);
|
||||
|
||||
|
@ -850,6 +856,7 @@ void q1_fire_lavaball (edict_t *self, vec3_t start, vec3_t dir, int damage, int
|
|||
lavaball->classname = "chthon_lavaball";
|
||||
|
||||
lavaball->common_name = "Chthon Lavaball";
|
||||
lavaball->class_id = ENTITY_Q1_LAVABALL;
|
||||
|
||||
gi.linkentity (lavaball);
|
||||
}
|
||||
|
@ -931,6 +938,7 @@ void q1_fire_acidspit (edict_t *self, vec3_t start, vec3_t dir, int damage, int
|
|||
acidbolt->classname = "acidbolt";
|
||||
|
||||
acidbolt->common_name = "Acid Bolt";
|
||||
acidbolt->class_id = ENTITY_Q1_ACIDBOLT;
|
||||
|
||||
gi.linkentity (acidbolt);
|
||||
}
|
||||
|
@ -1004,11 +1012,13 @@ void q1_fire_gib (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int sp
|
|||
gib->owner = self;
|
||||
gib->touch = q1_zombiegib_touch;
|
||||
gib->nextthink = level.time + 2.5;
|
||||
gib->think = G_FreeEdict;
|
||||
// gib->think = G_FreeEdict;
|
||||
gib->think = gib_fade; // use gib_fade() instead of directly removing
|
||||
gib->dmg = damage;
|
||||
gib->classname = "gib";
|
||||
|
||||
gib->common_name = "Gib Projectile";
|
||||
gib->class_id = ENTITY_Q1_ZOMBIE_GIB;
|
||||
|
||||
gi.linkentity (gib);
|
||||
}
|
||||
|
|
|
@ -304,68 +304,85 @@ ENTITY_MONSTER_COCO_MONKEY,
|
|||
ENTITY_MONSTER_PIERRE_MONKEY1,
|
||||
ENTITY_MONSTER_PIERRE_MONKEY2,
|
||||
ENTITY_MONSTER_PIERRE_MONKEY3,
|
||||
ENTITY_FLAME1,
|
||||
ENTITY_FLAME1_S,
|
||||
ENTITY_FLAME2,
|
||||
ENTITY_FLAME2_S,
|
||||
ENTITY_SICK_GUARD,
|
||||
ENTITY_GEKK_WRITHE,
|
||||
ENTITY_LIGHT_TORCH,
|
||||
ENTITY_LIGHT_FLAME,
|
||||
ENTITY_LIGHT_FLAME_CM,
|
||||
ENTITY_MISC_SICK_GUARD,
|
||||
ENTITY_MISC_GEKK_WRITHE,
|
||||
ENTITY_TARGET_COMMAND,
|
||||
ENTITY_TARGET_GLOBAL_TEXT,
|
||||
// Xatrix
|
||||
ENTITY_MONSTER_GEKK,
|
||||
ENTITY_MONSTER_BRAIN_BETA,
|
||||
ENTITY_MONSTER_CHICK_HEAT,
|
||||
ENTITY_MONSTER_GLADIATOR_BETA,
|
||||
ENTITY_MONSTER_SOLDIER_RIPPER,
|
||||
ENTITY_MONSTER_SOLDIER_HYPERGUN,
|
||||
ENTITY_MONSTER_SOLDIER_LASER,
|
||||
ENTITY_MONSTER_BOSS5,
|
||||
ENTITY_MONSTER_SUPERTANK_BETA,
|
||||
ENTITY_ION,
|
||||
ENTITY_PLASMA,
|
||||
ENTITY_TRAP,
|
||||
ENTITY_LOOGIE,
|
||||
ENTITY_MISC_VIPER_MISSILE,
|
||||
ENTITY_MISC_TRANSPORT,
|
||||
ENTITY_MISC_AMB4,
|
||||
ENTITY_ROTATING_LIGHT,
|
||||
ENTITY_OBJECT_REPAIR,
|
||||
ENTITY_ITEM_FOODCUBE,
|
||||
// Rogue
|
||||
ENTITY_INFO_PLAYER_COOP_LAVA,
|
||||
ENTITY_FUNC_DM_WALL,
|
||||
ENTITY_TRIGGER_TELEPORT,
|
||||
ENTITY_TARGET_STEAM,
|
||||
ENTITY_TARGET_KILLPLAYERS,
|
||||
ENTITY_TARGET_BLACKLIGHT,
|
||||
ENTITY_TARGET_ORB,
|
||||
ENTITY_TURRET_INVISIBLE_BRAIN,
|
||||
ENTITY_MONSTER_MEDIC_COMMANDER,
|
||||
ENTITY_MONSTER_DAEDALUS,
|
||||
ENTITY_MONSTER_FLYER_KAMIKAZE,
|
||||
ENTITY_STALKER,
|
||||
ENTITY_MONSTER_TURRET,
|
||||
ENTITY_MONSTER_CARRIER,
|
||||
ENTITY_MONSTER_WIDOW,
|
||||
ENTITY_MONSTER_WIDOW2,
|
||||
ENTITY_MONSTER_TURRET,
|
||||
ENTITY_TURRET_WALL,
|
||||
ENTITY_BOLT2,
|
||||
ENTITY_FLECHETTE,
|
||||
ENTITY_DISRUPTOR,
|
||||
ENTITY_TRACKER,
|
||||
ENTITY_MINE_PROX,
|
||||
ENTITY_MINE_TESLA,
|
||||
ENTITY_AM_BOMB,
|
||||
ENTITY_FLAMEBURST,
|
||||
ENTITY_INCENDIARY_GRENADE,
|
||||
ENTITY_NUKE,
|
||||
ENTITY_SPHERE_DEFENDER,
|
||||
ENTITY_SPHERE_VENGEANCE,
|
||||
ENTITY_SPHERE_HUNTER,
|
||||
ENTITY_DOPPLEGANGER,
|
||||
ENTITY_TAGTOKEN,
|
||||
ENTITY_NUKE_CORE,
|
||||
ENTITY_NUKE,
|
||||
ENTITY_MISC_NUKE_CORE,
|
||||
ENTITY_MISC_NUKE,
|
||||
// Zaero
|
||||
ENTITY_FUNC_BARRIER,
|
||||
ENTITY_TRIGGER_LASER,
|
||||
ENTITY_MONSTER_SENTIEN,
|
||||
ENTITY_MONSTER_HANDLER,
|
||||
ENTITY_MONSTER_HOUND,
|
||||
ENTITY_MONSTER_ZBOSS,
|
||||
ENTITY_Z_SECURITYCAMERA,
|
||||
ENTITY_Z_CRATE,
|
||||
ENTITY_Z_SEAT,
|
||||
ENTITY_Z_COMMDISH,
|
||||
ENTITY_Z_PLASMASHEILD,
|
||||
ENTITY_MONSTER_AUTOCANNON,
|
||||
ENTITY_MISC_SECURITYCAMERA,
|
||||
ENTITY_MISC_CRATE,
|
||||
ENTITY_MISC_SEAT,
|
||||
ENTITY_MISC_COMMDISH,
|
||||
ENTITY_Z_PLASMASHIELD,
|
||||
ENTITY_Z_FLARE,
|
||||
ENTITY_Z_TBOMB,
|
||||
ENTITY_Z_EMPNUKECENTER,
|
||||
// LMSP
|
||||
ENTITY_MONSTER_SOLDIER_PLASMA_BOUNCE,
|
||||
ENTITY_MONSTER_SOLDIER_PLASMA_SPREAD,
|
||||
ENTITY_GOOP_BOUNCE,
|
||||
ENTITY_GOOP_SPREAD,
|
||||
ENTITY_GOOP,
|
||||
// Q1
|
||||
ENTITY_MONSTER_Q1_CHTHON,
|
||||
ENTITY_MONSTER_Q1_DOG,
|
||||
|
@ -384,21 +401,23 @@ ENTITY_MONSTER_Q1_ZOMBIE,
|
|||
ENTITY_MONSTER_Q1_SHUB,
|
||||
ENTITY_Q1_TELEPORT_TRAIN,
|
||||
ENTITY_Q1_NAIL,
|
||||
ENTITY_Q1_GRENADE,
|
||||
ENTITY_Q1_ROCKET,
|
||||
ENTITY_Q1_ACIDBOLT,
|
||||
ENTITY_Q1_LASER,
|
||||
ENTITY_Q1_HKNIGHT_FLAME,
|
||||
ENTITY_Q1_GRENADE,
|
||||
ENTITY_Q1_ROCKET,
|
||||
ENTITY_Q1_FIREPOD,
|
||||
ENTITY_Q1_LAVABALL,
|
||||
ENTITY_Q1_ZOMBIEGIB,
|
||||
ENTITY_Q1_ZOMBIE_CRUCIFIED,
|
||||
ENTITY_Q1_ACIDBOLT,
|
||||
ENTITY_Q1_ZOMBIE_GIB,
|
||||
ENTITY_MISC_Q1_ZOMBIE_CRUCIFIED,
|
||||
ENTITY_Q1_BUBBLE,
|
||||
ENTITY_Q1_GLOBE,
|
||||
ENTITY_Q1_FLAME_LARGE,
|
||||
ENTITY_Q1_FLAME_SMALL,
|
||||
ENTITY_Q1_TORCH,
|
||||
ENTITY_Q1_TRAPSHOOTER,
|
||||
ENTITY_Q1_EXPLOBOX,
|
||||
ENTITY_Q1_FIREBALL
|
||||
ENTITY_MISC_Q1_BUBBLE_SPAWNER,
|
||||
ENTITY_MISC_Q1_GLOBE,
|
||||
ENTITY_MISC_Q1_FLAME_SMALL,
|
||||
ENTITY_MISC_Q1_FLAME_LARGE,
|
||||
ENTITY_MISC_Q1_TORCH,
|
||||
ENTITY_TARGET_Q1_TRAPSHOOTER,
|
||||
ENTITY_MISC_Q1_EXPLOBOX,
|
||||
ENTITY_Q1_FIREBALL,
|
||||
ENTITY_MISC_Q1_FIREBALL_SPAWNER
|
||||
} entity_id;
|
||||
|
|
|
@ -590,6 +590,7 @@ void SP_monster_berserk (edict_t *self)
|
|||
self->monsterinfo.flies = 0.20;
|
||||
|
||||
self->common_name = "Berserker";
|
||||
self->class_id = ENTITY_MONSTER_BERSERK;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -927,7 +927,9 @@ void SP_monster_boss2 (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Hornet";
|
||||
self->class_id = ENTITY_MONSTER_BOSS2;
|
||||
|
||||
flymonster_start (self);
|
||||
}
|
||||
|
|
|
@ -53,5 +53,8 @@ void SP_monster_boss3_stand (edict_t *self)
|
|||
self->use = Use_Boss3;
|
||||
self->think = Think_Boss3Stand;
|
||||
self->nextthink = level.time + FRAMETIME;
|
||||
|
||||
self->class_id = ENTITY_MONSTER_BOSS3_STAND;
|
||||
|
||||
gi.linkentity (self);
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ void jorg_pain (edict_t *self, edict_t *other, float kick, int damage)
|
|||
if (self->health < (self->max_health / 2))
|
||||
{
|
||||
self->s.skinnum |= 1;
|
||||
if (!(self->fogclip & 2)) // custom bloodtype flag check
|
||||
if ( !(self->fogclip & 2) ) // custom bloodtype flag check
|
||||
self->blood_type = 3; // sparks and blood
|
||||
}
|
||||
|
||||
|
@ -709,7 +709,7 @@ void jorg_dead (edict_t *self)
|
|||
void jorg_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
|
||||
{
|
||||
self->s.skinnum |= 1;
|
||||
if (!(self->fogclip & 2)) // custom bloodtype flag check
|
||||
if ( !(self->fogclip & 2) ) // custom bloodtype flag check
|
||||
self->blood_type = 3; // sparks and blood
|
||||
self->s.sound = 0;
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_NONE;
|
||||
|
@ -920,6 +920,12 @@ void SP_monster_jorg (edict_t *self)
|
|||
gi.linkentity (self);
|
||||
|
||||
self->monsterinfo.currentmove = &jorg_move_stand;
|
||||
if (self->health < 0)
|
||||
{
|
||||
mmove_t *deathmoves[] = {&jorg_move_death,
|
||||
NULL};
|
||||
M_SetDeath(self,(mmove_t **)&deathmoves);
|
||||
}
|
||||
self->monsterinfo.scale = MODEL_SCALE;
|
||||
|
||||
// Lazarus
|
||||
|
@ -931,7 +937,9 @@ void SP_monster_jorg (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Jorg";
|
||||
self->class_id = ENTITY_MONSTER_JORG;
|
||||
|
||||
walkmonster_start(self);
|
||||
//PMM
|
||||
|
|
|
@ -883,7 +883,7 @@ qboolean Makron_blocked (edict_t *self, float dist)
|
|||
|
||||
/*QUAKED monster_makron (1 .5 0) (-30 -30 0) (30 30 90) Ambush Trigger_Spawn Sight GoodGuy NoGib
|
||||
*/
|
||||
//Knightmare- direct spawn function, sets nojump flag
|
||||
// Knightmare- direct spawn function, sets nojump flag
|
||||
void SP_monster_makron (edict_t *self)
|
||||
{
|
||||
self->fogclip |= 1;
|
||||
|
@ -932,7 +932,7 @@ void SP_monster_makron_put (edict_t *self)
|
|||
self->monsterinfo.dodge = NULL;
|
||||
self->monsterinfo.attack = makron_attack;
|
||||
self->monsterinfo.melee = NULL;
|
||||
//Knightmare- don't jump flag
|
||||
// Knightmare- don't jump flag
|
||||
if (self->fogclip & 1)
|
||||
self->monsterinfo.sight = NULL;
|
||||
else
|
||||
|
@ -956,16 +956,23 @@ void SP_monster_makron_put (edict_t *self)
|
|||
}
|
||||
|
||||
self->common_name = "Makron";
|
||||
self->class_id = ENTITY_MONSTER_MAKRON;
|
||||
|
||||
gi.linkentity (self);
|
||||
//Knightmare- nojump flag
|
||||
// Knightmare- nojump flag
|
||||
if (self->fogclip & 1)
|
||||
self->monsterinfo.currentmove = &makron_move_stand;
|
||||
else
|
||||
self->monsterinfo.currentmove = &makron_move_sight;
|
||||
|
||||
if (self->health < 0)
|
||||
{
|
||||
mmove_t *deathmoves[] = {&makron_move_death2,
|
||||
&makron_move_death3,
|
||||
NULL};
|
||||
M_SetDeath(self,(mmove_t **)&deathmoves);
|
||||
}
|
||||
self->monsterinfo.scale = MODEL_SCALE;
|
||||
|
||||
walkmonster_start(self);
|
||||
//PMM
|
||||
//self->monsterinfo.aiflags |= AI_IGNORE_SHOTS;
|
||||
|
@ -983,9 +990,10 @@ void MakronSpawn (edict_t *self)
|
|||
{
|
||||
vec3_t vec;
|
||||
edict_t *player;
|
||||
|
||||
SP_monster_makron_put (self);
|
||||
|
||||
//Knightmare- gross hack for map6 of COS3- don't jump
|
||||
// Knightmare- gross hack for map6 of COS3- don't jump
|
||||
if (Q_stricmp(level.mapname, "grinsp3f") == 0)
|
||||
return;
|
||||
// jump at player
|
||||
|
|
|
@ -716,7 +716,9 @@ void SP_monster_boss5 (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = 400;
|
||||
}
|
||||
|
||||
self->common_name = "Beta Class Supertank";
|
||||
self->class_id = ENTITY_MONSTER_SUPERTANK_BETA;
|
||||
|
||||
walkmonster_start(self);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ mmove_t brain_move_idle = {FRAME_stand31, FRAME_stand60, brain_frames_idle, brai
|
|||
|
||||
void brain_idle (edict_t *self)
|
||||
{
|
||||
if(!(self->spawnflags & SF_MONSTER_AMBUSH)) //Knightmare- play all 3 idle sounds
|
||||
if (!(self->spawnflags & SF_MONSTER_AMBUSH)) //Knightmare- play all 3 idle sounds
|
||||
{
|
||||
float r = random();
|
||||
|
||||
|
@ -595,7 +595,7 @@ void brain_dead (edict_t *self)
|
|||
M_FlyCheck (self);
|
||||
|
||||
// Lazarus monster fade
|
||||
if(world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
if (world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
{
|
||||
self->think=FadeDieSink;
|
||||
self->nextthink=level.time+corpse_fadetime->value;
|
||||
|
@ -699,11 +699,11 @@ void SP_monster_brain (edict_t *self)
|
|||
VectorSet (self->mins, -16, -16, -24);
|
||||
VectorSet (self->maxs, 16, 16, 32);
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
self->health = 300;
|
||||
if(!self->gib_health)
|
||||
if (!self->gib_health)
|
||||
self->gib_health = -150;
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 400;
|
||||
|
||||
self->pain = brain_pain;
|
||||
|
@ -725,7 +725,7 @@ void SP_monster_brain (edict_t *self)
|
|||
self->monsterinfo.idle = brain_idle;
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -739,9 +739,11 @@ void SP_monster_brain (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = 100;
|
||||
}
|
||||
|
||||
if(!self->monsterinfo.flies)
|
||||
if (!self->monsterinfo.flies)
|
||||
self->monsterinfo.flies = 0.10;
|
||||
|
||||
self->common_name = "Brain";
|
||||
self->class_id = ENTITY_MONSTER_BRAIN;
|
||||
|
||||
if (!self->blood_type)
|
||||
self->blood_type = 3; //sparks and blood
|
||||
|
|
|
@ -130,7 +130,7 @@ mmove_t brainbeta_move_idle = {FRAME_stand31, FRAME_stand60, brainbeta_frames_id
|
|||
|
||||
void brainbeta_idle (edict_t *self)
|
||||
{
|
||||
if(!(self->spawnflags & SF_MONSTER_AMBUSH)) //Knightmare- play all 3 idle sounds
|
||||
if (!(self->spawnflags & SF_MONSTER_AMBUSH)) //Knightmare- play all 3 idle sounds
|
||||
{
|
||||
float r = random();
|
||||
|
||||
|
@ -841,7 +841,7 @@ void brainbeta_dead (edict_t *self)
|
|||
M_FlyCheck (self);
|
||||
|
||||
// Lazarus monster fade
|
||||
if(world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
if (world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
{
|
||||
self->think=FadeDieSink;
|
||||
self->nextthink=level.time+corpse_fadetime->value;
|
||||
|
@ -948,11 +948,11 @@ void SP_monster_brain_beta (edict_t *self)
|
|||
VectorSet (self->mins, -16, -16, -24);
|
||||
VectorSet (self->maxs, 16, 16, 32);
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
self->health = 300;
|
||||
if(!self->gib_health)
|
||||
if (!self->gib_health)
|
||||
self->gib_health = -150;
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 400;
|
||||
|
||||
self->pain = brainbeta_pain;
|
||||
|
@ -974,7 +974,7 @@ void SP_monster_brain_beta (edict_t *self)
|
|||
self->monsterinfo.idle = brainbeta_idle;
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -988,9 +988,11 @@ void SP_monster_brain_beta (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = 100;
|
||||
}
|
||||
|
||||
if(!self->monsterinfo.flies)
|
||||
if (!self->monsterinfo.flies)
|
||||
self->monsterinfo.flies = 0.10;
|
||||
|
||||
self->common_name = "Beta-Class Brain";
|
||||
self->class_id = ENTITY_MONSTER_BRAIN_BETA;
|
||||
|
||||
if (!self->blood_type)
|
||||
self->blood_type = 3; //sparks and blood
|
||||
|
|
|
@ -1413,6 +1413,7 @@ void SP_monster_carrier (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Carrier";
|
||||
self->class_id = ENTITY_MONSTER_CARRIER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -1030,6 +1030,7 @@ void SP_monster_chick (edict_t *self)
|
|||
self->monsterinfo.flies = 0.40;
|
||||
|
||||
self->common_name = "Iron Maiden";
|
||||
self->class_id = ENTITY_MONSTER_CHICK;
|
||||
|
||||
// PMM
|
||||
// Knightmare- no blindfire with homing rockets in easy or medium skill
|
||||
|
@ -1045,6 +1046,7 @@ void SP_monster_chick (edict_t *self)
|
|||
else
|
||||
self->fogclip |= 2; //custom bloodtype flag
|
||||
self->common_name = "Beta Class Iron Maiden";
|
||||
self->class_id = ENTITY_MONSTER_CHICK_HEAT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -500,7 +500,9 @@ void SP_monster_dog (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Rottweiler";
|
||||
self->class_id = ENTITY_MONSTER_DOG;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -428,6 +428,7 @@ void SP_monster_flipper (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Barracuda Shark";
|
||||
self->class_id = ENTITY_MONSTER_FLIPPER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -739,6 +739,7 @@ void SP_monster_floater (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Technician";
|
||||
self->class_id = ENTITY_MONSTER_FLOATER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -461,7 +461,7 @@ void flyer_fire (edict_t *self, int flash_number)
|
|||
vec3_t dir;
|
||||
int effect;
|
||||
|
||||
if(!self->enemy || !self->enemy->inuse) //PGM
|
||||
if (!self->enemy || !self->enemy->inuse) //PGM
|
||||
return; //PGM
|
||||
|
||||
if ((self->s.frame == FRAME_attak204) || (self->s.frame == FRAME_attak207) || (self->s.frame == FRAME_attak210))
|
||||
|
@ -475,7 +475,7 @@ void flyer_fire (edict_t *self, int flash_number)
|
|||
end[2] += self->enemy->viewheight;
|
||||
|
||||
// Lazarus fog reduction of accuracy
|
||||
if(self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
if (self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
{
|
||||
end[0] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
end[1] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
|
@ -766,7 +766,7 @@ qboolean flyer_blocked (edict_t *self, float dist)
|
|||
return true;
|
||||
}
|
||||
// we're a normal flyer
|
||||
if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
|
||||
if (blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -789,7 +789,7 @@ void SP_monster_flyer (edict_t *self)
|
|||
self->target = NULL;
|
||||
}
|
||||
|
||||
//Knightmare- random replacement with kamikaze flyers
|
||||
// Knightmare- random replacement with kamikaze flyers
|
||||
if (kamikaze_flyer_replace->value > 0.0)
|
||||
{
|
||||
float r = random();
|
||||
|
@ -828,9 +828,9 @@ void SP_monster_flyer (edict_t *self)
|
|||
|
||||
self->s.sound = gi.soundindex ("flyer/flyidle1.wav");
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
self->health = 50;
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 50;
|
||||
|
||||
self->pain = flyer_pain;
|
||||
|
@ -849,7 +849,7 @@ void SP_monster_flyer (edict_t *self)
|
|||
self->blood_type = 3; //sparks and blood
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -858,6 +858,7 @@ void SP_monster_flyer (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Flyer";
|
||||
self->class_id = ENTITY_MONSTER_FLYER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
@ -904,10 +905,10 @@ void SP_monster_kamikaze (edict_t *self)
|
|||
|
||||
self->s.effects |= EF_ROCKET;
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
self->health = 50;
|
||||
// PMM - normal flyer has mass of 50
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 100;
|
||||
|
||||
self->pain = flyer_pain;
|
||||
|
@ -926,7 +927,7 @@ void SP_monster_kamikaze (edict_t *self)
|
|||
self->blood_type = 3; //sparks and blood
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -935,6 +936,7 @@ void SP_monster_kamikaze (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Kamikaze Flyer";
|
||||
self->class_id = ENTITY_MONSTER_FLYER_KAMIKAZE;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -95,16 +95,16 @@ qboolean gekk_check_jump_hazard (edict_t *self, qboolean watertoland, qboolean f
|
|||
// Lazarus: Don't intentionally move closer to a grenade,
|
||||
// but don't perform this check if we're already evading some
|
||||
// other problem (maybe even this grenade)
|
||||
if(!(self->monsterinfo.aiflags & AI_CHASE_THING))
|
||||
if (!(self->monsterinfo.aiflags & AI_CHASE_THING))
|
||||
{
|
||||
grenade = NULL;
|
||||
while( (grenade = findradius(grenade,neworg,128)) != NULL)
|
||||
{
|
||||
if(!grenade->inuse)
|
||||
if (!grenade->inuse)
|
||||
continue;
|
||||
if(!grenade->classname)
|
||||
if (!grenade->classname)
|
||||
continue;
|
||||
if(!Q_stricmp(grenade->classname,"grenade") || !Q_stricmp(grenade->classname,"hgrenade"))
|
||||
if (!Q_stricmp(grenade->classname,"grenade") || !Q_stricmp(grenade->classname,"hgrenade"))
|
||||
{
|
||||
VectorSubtract(grenade->s.origin, oldorg, dir);
|
||||
g1 = VectorLength(dir);
|
||||
|
@ -786,6 +786,8 @@ void fire_loogie (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
|
|||
loogie->nextthink = level.time + 2;
|
||||
loogie->think = G_FreeEdict;
|
||||
loogie->dmg = damage;
|
||||
loogie->classname = "loogie";
|
||||
loogie->class_id = ENTITY_LOOGIE;
|
||||
gi.linkentity (loogie);
|
||||
|
||||
tr = gi.trace (self->s.origin, NULL, NULL, loogie->s.origin, loogie, MASK_SHOT);
|
||||
|
@ -801,7 +803,7 @@ void fire_loogie (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed
|
|||
|
||||
void gekk_loogie_delayed_start (edict_t *loogie)
|
||||
{
|
||||
if(g_edicts[1].linkcount)
|
||||
if (g_edicts[1].linkcount)
|
||||
{
|
||||
VectorScale(loogie->movedir,loogie->moveinfo.speed,loogie->velocity);
|
||||
loogie->nextthink = level.time + 2;
|
||||
|
@ -849,7 +851,7 @@ void loogie (edict_t *self)
|
|||
end[2] += self->enemy->viewheight;
|
||||
|
||||
// Lazarus fog reduction of accuracy
|
||||
if(self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
if (self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
{
|
||||
end[0] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
end[1] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
|
@ -1360,7 +1362,7 @@ void gekk_dead (edict_t *self)
|
|||
M_FlyCheck (self);
|
||||
}
|
||||
// Lazarus monster fade
|
||||
if(world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
if (world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
{
|
||||
self->think=FadeDieSink;
|
||||
self->nextthink=level.time+corpse_fadetime->value;
|
||||
|
@ -1787,16 +1789,16 @@ void SP_monster_gekk (edict_t *self)
|
|||
gi.modelindex ("models/objects/gekkgib/leg/tris.md2");
|
||||
gi.modelindex ("models/objects/gekkgib/head/tris.md2");
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
{
|
||||
if (skill->value == 0)
|
||||
self->health = 120;
|
||||
else
|
||||
self->health = 150;
|
||||
}
|
||||
if(!self->gib_health)
|
||||
if (!self->gib_health)
|
||||
self->gib_health = -100;
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 300;
|
||||
|
||||
self->pain = gekk_pain;
|
||||
|
@ -1819,7 +1821,7 @@ void SP_monster_gekk (edict_t *self)
|
|||
self->monsterinfo.flies = 0.70;
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -1827,7 +1829,9 @@ void SP_monster_gekk (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Gekk";
|
||||
self->class_id = ENTITY_MONSTER_GEKK;
|
||||
|
||||
if (!self->blood_type)
|
||||
self->blood_type = 1; //Knightmare- set this for blood color
|
||||
|
|
|
@ -24,7 +24,7 @@ static int sound_sight;
|
|||
|
||||
void gladb_idle (edict_t *self)
|
||||
{
|
||||
if(!(self->spawnflags & SF_MONSTER_AMBUSH))
|
||||
if (!(self->spawnflags & SF_MONSTER_AMBUSH))
|
||||
gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ void gladbGun (edict_t *self)
|
|||
// calc direction to where we targted
|
||||
|
||||
// Lazarus fog reduction of accuracy
|
||||
if(self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
if (self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
{
|
||||
self->pos1[0] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
self->pos1[1] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
|
@ -273,7 +273,7 @@ void gladb_dead (edict_t *self)
|
|||
M_FlyCheck (self);
|
||||
|
||||
// Lazarus monster fade
|
||||
if(world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
if (world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
{
|
||||
self->think=FadeDieSink;
|
||||
self->nextthink=level.time+corpse_fadetime->value;
|
||||
|
@ -342,10 +342,10 @@ void gladb_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
|
|||
//PGM
|
||||
qboolean gladb_blocked (edict_t *self, float dist)
|
||||
{
|
||||
if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
|
||||
if (blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
|
||||
return true;
|
||||
|
||||
if(blocked_checkplat (self, dist))
|
||||
if (blocked_checkplat (self, dist))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -396,11 +396,11 @@ void SP_monster_gladb (edict_t *self)
|
|||
VectorSet (self->mins, -32, -32, -24);
|
||||
VectorSet (self->maxs, 32, 32, 40);
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
self->health = 800;
|
||||
if(!self->gib_health)
|
||||
if (!self->gib_health)
|
||||
self->gib_health = -175;
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 350;
|
||||
|
||||
self->pain = gladb_pain;
|
||||
|
@ -425,7 +425,7 @@ void SP_monster_gladb (edict_t *self)
|
|||
self->monsterinfo.scale = MODEL_SCALE;
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -439,10 +439,11 @@ void SP_monster_gladb (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = 400;
|
||||
}
|
||||
|
||||
if(!self->monsterinfo.flies)
|
||||
if (!self->monsterinfo.flies)
|
||||
self->monsterinfo.flies = 0.025;
|
||||
|
||||
self->common_name = "Beta Class Gladiator";
|
||||
self->class_id = ENTITY_MONSTER_GLADIATOR_BETA;
|
||||
|
||||
walkmonster_start (self);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ static int sound_sight;
|
|||
|
||||
void gladiator_idle (edict_t *self)
|
||||
{
|
||||
if(!(self->spawnflags & SF_MONSTER_AMBUSH))
|
||||
if (!(self->spawnflags & SF_MONSTER_AMBUSH))
|
||||
gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ void GladiatorGun (edict_t *self)
|
|||
// calc direction to where we targted
|
||||
|
||||
// Lazarus fog reduction of accuracy
|
||||
if(self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
if (self->monsterinfo.visibility < FOG_CANSEEGOOD)
|
||||
{
|
||||
self->pos1[0] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
self->pos1[1] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
|
||||
|
@ -269,7 +269,7 @@ void gladiator_dead (edict_t *self)
|
|||
M_FlyCheck (self);
|
||||
|
||||
// Lazarus monster fade
|
||||
if(world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
if (world->effects & FX_WORLDSPAWN_CORPSEFADE)
|
||||
{
|
||||
self->think=FadeDieSink;
|
||||
self->nextthink=level.time+corpse_fadetime->value;
|
||||
|
@ -337,10 +337,10 @@ void gladiator_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int da
|
|||
//PGM
|
||||
qboolean gladiator_blocked (edict_t *self, float dist)
|
||||
{
|
||||
if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
|
||||
if (blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
|
||||
return true;
|
||||
|
||||
if(blocked_checkplat (self, dist))
|
||||
if (blocked_checkplat (self, dist))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -384,11 +384,11 @@ void SP_monster_gladiator (edict_t *self)
|
|||
VectorSet (self->mins, -32, -32, -24);
|
||||
VectorSet (self->maxs, 32, 32, 40);
|
||||
|
||||
if(!self->health)
|
||||
if (!self->health)
|
||||
self->health = 400;
|
||||
if(!self->gib_health)
|
||||
if (!self->gib_health)
|
||||
self->gib_health = -175;
|
||||
if(!self->mass)
|
||||
if (!self->mass)
|
||||
self->mass = 400;
|
||||
|
||||
self->pain = gladiator_pain;
|
||||
|
@ -409,7 +409,7 @@ void SP_monster_gladiator (edict_t *self)
|
|||
self->blood_type = 3; //sparks and blood
|
||||
|
||||
// Lazarus
|
||||
if(self->powerarmor)
|
||||
if (self->powerarmor)
|
||||
{
|
||||
if (self->powerarmortype == 1)
|
||||
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
|
||||
|
@ -417,9 +417,11 @@ void SP_monster_gladiator (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
if(!self->monsterinfo.flies)
|
||||
if (!self->monsterinfo.flies)
|
||||
self->monsterinfo.flies = 0.05;
|
||||
|
||||
self->common_name = "Gladiator";
|
||||
self->class_id = ENTITY_MONSTER_GLADIATOR;
|
||||
|
||||
gi.linkentity (self);
|
||||
self->monsterinfo.currentmove = &gladiator_move_stand;
|
||||
|
|
|
@ -1151,6 +1151,7 @@ void SP_monster_gunner (edict_t *self)
|
|||
self->monsterinfo.flies = 0.30;
|
||||
|
||||
self->common_name = "Gunner";
|
||||
self->class_id = ENTITY_MONSTER_GUNNER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -828,7 +828,8 @@ void SP_monster_hover (edict_t *self)
|
|||
// Knightmare- precache blaster bolt
|
||||
gi.modelindex ("models/proj/laser2/tris.md2");
|
||||
// pmm
|
||||
self->common_name = "Daedalus"; //Knightmare
|
||||
self->common_name = "Daedalus"; // Knightmare
|
||||
self->class_id = ENTITY_MONSTER_DAEDALUS;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -848,7 +849,8 @@ void SP_monster_hover (edict_t *self)
|
|||
gi.soundindex ("hover/hovatck1.wav");
|
||||
|
||||
self->s.sound = gi.soundindex ("hover/hovidle1.wav");
|
||||
self->common_name = "Icarus"; //Knightmare
|
||||
self->common_name = "Icarus"; // Knightmare
|
||||
self->class_id = ENTITY_MONSTER_HOVER;
|
||||
}
|
||||
//PGM
|
||||
|
||||
|
|
|
@ -887,6 +887,7 @@ void SP_monster_infantry (edict_t *self)
|
|||
self->monsterinfo.flies = 0.40;
|
||||
|
||||
self->common_name = "Enforcer";
|
||||
self->class_id = ENTITY_MONSTER_INFANTRY;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -2162,7 +2162,8 @@ void SP_monster_medic (edict_t *self)
|
|||
commander_sound_spawn = gi.soundindex ("medic_commander/monsterspawn1.wav");
|
||||
gi.soundindex ("tank/tnkatck3.wav");
|
||||
|
||||
self->common_name = "Medic Commander"; //Knightmare
|
||||
self->common_name = "Medic Commander"; // Knightmare
|
||||
self->class_id = ENTITY_MONSTER_MEDIC_COMMANDER;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2179,7 +2180,8 @@ void SP_monster_medic (edict_t *self)
|
|||
gi.soundindex ("medic/medatck1.wav");
|
||||
|
||||
// self->s.skinnum = 0;
|
||||
self->common_name = "Medic"; //Knightmare
|
||||
self->common_name = "Medic"; // Knightmare
|
||||
self->class_id = ENTITY_MONSTER_MEDIC;
|
||||
}
|
||||
//pmm
|
||||
}
|
||||
|
|
|
@ -754,6 +754,7 @@ void SP_monster_mutant (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Mutant";
|
||||
self->class_id = ENTITY_MONSTER_MUTANT;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -723,6 +723,7 @@ void SP_monster_parasite (edict_t *self)
|
|||
self->monsterinfo.flies = 0.30;
|
||||
|
||||
self->common_name = "Parasite";
|
||||
self->class_id = ENTITY_MONSTER_PARASITE;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -491,7 +491,9 @@ void SP_monster_q1_dog (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Rottweiler";
|
||||
self->class_id = ENTITY_MONSTER_Q1_DOG;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -398,7 +398,9 @@ void SP_monster_q1_enforcer (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Enforcer";
|
||||
self->class_id = ENTITY_MONSTER_Q1_ENFORCER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -509,7 +509,9 @@ void SP_monster_q1_fiend (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Fiend";
|
||||
self->class_id = ENTITY_MONSTER_Q1_FIEND;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -457,7 +457,9 @@ void SP_monster_q1_grunt (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Grunt";
|
||||
self->class_id = ENTITY_MONSTER_Q1_GRUNT;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -549,7 +549,9 @@ void SP_monster_q1_hknight (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Hell Knight";
|
||||
self->class_id = ENTITY_MONSTER_Q1_HKNIGHT;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -463,7 +463,9 @@ void SP_monster_q1_knight (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Knight";
|
||||
self->class_id = ENTITY_MONSTER_Q1_KNIGHT;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -575,7 +575,9 @@ void SP_monster_q1_ogre (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Ogre";
|
||||
self->class_id = ENTITY_MONSTER_Q1_OGRE;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -288,7 +288,9 @@ void SP_monster_q1_rotfish (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Rotfish";
|
||||
self->class_id = ENTITY_MONSTER_Q1_ROTFISH;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -391,7 +391,9 @@ void SP_monster_q1_scrag (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Scrag";
|
||||
self->class_id = ENTITY_MONSTER_Q1_SCRAG;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -329,7 +329,9 @@ void SP_monster_q1_shalrath (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Vore";
|
||||
self->class_id = ENTITY_MONSTER_Q1_SHALRATH;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -574,7 +574,9 @@ void SP_monster_q1_shambler (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Shambler";
|
||||
self->class_id = ENTITY_MONSTER_Q1_SHAMBLER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -364,7 +364,9 @@ void SP_monster_q1_tarbaby (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Spawn";
|
||||
self->class_id = ENTITY_MONSTER_Q1_TARBABY;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -700,7 +700,9 @@ void SP_monster_q1_zombie (edict_t *self)
|
|||
self->monsterinfo.power_armor_type = POWER_ARMOR_SHIELD;
|
||||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
|
||||
self->common_name = "Zombie";
|
||||
self->class_id = ENTITY_MONSTER_Q1_ZOMBIE;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -573,15 +573,15 @@ void soldier_fire (edict_t *self, int in_flash_number)
|
|||
//gi.dprintf ("Dot Product: %f", DotProduct (aim_norm, forward));
|
||||
if (angle < 0.9) // ~25 degree angle
|
||||
{
|
||||
// if (g_showlogic && g_showlogic->value)
|
||||
// gi.dprintf (" not firing due to bad dotprod %f\n", angle);
|
||||
// if (g_showlogic && g_showlogic->value)
|
||||
// gi.dprintf (" not firing due to bad dotprod %f\n", angle);
|
||||
return;
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// if (g_showlogic && g_showlogic->value)
|
||||
// gi.dprintf (" firing: dotprod = %f\n", angle);
|
||||
// }
|
||||
/* else
|
||||
{
|
||||
if (g_showlogic && g_showlogic->value)
|
||||
gi.dprintf (" firing: dotprod = %f\n", angle);
|
||||
} */
|
||||
}
|
||||
//-PMM
|
||||
#endif
|
||||
|
@ -616,8 +616,8 @@ void soldier_fire (edict_t *self, int in_flash_number)
|
|||
tr = gi.trace (start, NULL, NULL, aim_good, self, MASK_SHOT);
|
||||
if ((tr.ent != self->enemy) && (tr.ent != world))
|
||||
{
|
||||
// if (g_showlogic && g_showlogic->value)
|
||||
// gi.dprintf ("infantry shot aborted due to bad target\n");
|
||||
// if (g_showlogic && g_showlogic->value)
|
||||
// gi.dprintf ("infantry shot aborted due to bad target\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3070,7 +3070,6 @@ void soldierh_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int dam
|
|||
|
||||
void SP_monster_soldier_x (edict_t *self)
|
||||
{
|
||||
|
||||
// Lazarus: special purpose skins
|
||||
if ( self->style )
|
||||
PatchMonsterModel("models/monsters/soldier/tris.md2");
|
||||
|
@ -3158,7 +3157,9 @@ void SP_monster_soldier_light (edict_t *self)
|
|||
gi.modelindex ("models/objects/laser/tris.md2");
|
||||
gi.soundindex ("misc/lasfly.wav");
|
||||
gi.soundindex ("soldier/solatck2.wav");
|
||||
|
||||
self->common_name = "Light Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_LIGHT;
|
||||
|
||||
// self->s.skinnum = 0;
|
||||
if (!self->health)
|
||||
|
@ -3168,7 +3169,7 @@ void SP_monster_soldier_light (edict_t *self)
|
|||
|
||||
// PMM - blindfire
|
||||
self->monsterinfo.blindfire = true;
|
||||
//Knightmare- call generic spawn function LAST, because it
|
||||
// Knightmare- call generic spawn function LAST, because it
|
||||
// calls walkmonster_start, which the health and everything else need to be set up for
|
||||
SP_monster_soldier_x (self);
|
||||
// Lazarus: custom skins
|
||||
|
@ -3190,7 +3191,9 @@ void SP_monster_soldier (edict_t *self)
|
|||
sound_pain = gi.soundindex ("soldier/solpain1.wav");
|
||||
sound_death = gi.soundindex ("soldier/soldeth1.wav");
|
||||
gi.soundindex ("soldier/solatck1.wav");
|
||||
|
||||
self->common_name = "Shotgun Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER;
|
||||
|
||||
// self->s.skinnum = 2;
|
||||
if (!self->health)
|
||||
|
@ -3218,7 +3221,9 @@ void SP_monster_soldier_ss (edict_t *self)
|
|||
sound_pain_ss = gi.soundindex ("soldier/solpain3.wav");
|
||||
sound_death_ss = gi.soundindex ("soldier/soldeth3.wav");
|
||||
gi.soundindex ("soldier/solatck3.wav");
|
||||
|
||||
self->common_name = "Machinegun Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_SS;
|
||||
|
||||
// self->s.skinnum = 4;
|
||||
if (!self->health)
|
||||
|
@ -3245,10 +3250,11 @@ void SP_monster_soldier_plasma_re (edict_t *self)
|
|||
|
||||
sound_pain_ss = gi.soundindex ("soldier/solpain3.wav");
|
||||
sound_death_ss = gi.soundindex ("soldier/soldeth3.wav");
|
||||
gi.modelindex ("models/objects/laser/tris.md2");
|
||||
gi.soundindex ("misc/lasfly.wav");
|
||||
gi.modelindex (PLASMA_SPRITE_FLY);
|
||||
gi.soundindex ("soldier/solatck2.wav");
|
||||
|
||||
self->common_name = "Plasma Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_PLASMA_BOUNCE;
|
||||
|
||||
// self->s.skinnum = 0;
|
||||
if (!self->health)
|
||||
|
@ -3278,8 +3284,11 @@ void SP_monster_soldier_plasma_sp (edict_t *self)
|
|||
|
||||
sound_pain_ss = gi.soundindex ("soldier/solpain3.wav");
|
||||
sound_death_ss = gi.soundindex ("soldier/soldeth3.wav");
|
||||
gi.soundindex ("soldier/solatck1.wav");
|
||||
gi.modelindex (PLASMA_SPRITE_FLY);
|
||||
gi.soundindex ("soldier/solatck2.wav");
|
||||
|
||||
self->common_name = "Plasma Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_PLASMA_SPREAD;
|
||||
|
||||
// self->s.skinnum = 2;
|
||||
if (!self->health)
|
||||
|
@ -3391,9 +3400,11 @@ void SP_monster_soldier_ripper (edict_t *self)
|
|||
gi.modelindex ("models/objects/boomrang/tris.md2");
|
||||
gi.soundindex ("misc/lasfly.wav");
|
||||
gi.soundindex ("soldier/solatck2.wav");
|
||||
self->common_name = "Ripper Guard";
|
||||
|
||||
//self->s.skinnum = 0;
|
||||
self->common_name = "Ripper Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_RIPPER;
|
||||
|
||||
// self->s.skinnum = 0;
|
||||
if (!self->health)
|
||||
self->health = 50;
|
||||
if (!self->gib_health)
|
||||
|
@ -3425,7 +3436,9 @@ void SP_monster_soldier_hypergun (edict_t *self)
|
|||
sound_pain = gi.soundindex ("soldier/solpain1.wav");
|
||||
sound_death = gi.soundindex ("soldier/soldeth1.wav");
|
||||
gi.soundindex ("soldier/solatck1.wav");
|
||||
|
||||
self->common_name = "Hyperblaster Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_HYPERGUN;
|
||||
|
||||
//self->s.skinnum = 2;
|
||||
if (!self->health)
|
||||
|
@ -3456,7 +3469,9 @@ void SP_monster_soldier_lasergun (edict_t *self)
|
|||
sound_pain_ss = gi.soundindex ("soldier/solpain3.wav");
|
||||
sound_death_ss = gi.soundindex ("soldier/soldeth3.wav");
|
||||
gi.soundindex ("soldier/solatck3.wav");
|
||||
|
||||
self->common_name = "Laser Guard";
|
||||
self->class_id = ENTITY_MONSTER_SOLDIER_LASER;
|
||||
|
||||
//self->s.skinnum = 4;
|
||||
if (!self->health)
|
||||
|
|
|
@ -1263,6 +1263,7 @@ void SP_monster_stalker (edict_t *self)
|
|||
self->monsterinfo.flies = 0.40;
|
||||
|
||||
self->common_name = "Stalker";
|
||||
self->class_id = ENTITY_STALKER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -805,6 +805,7 @@ void SP_monster_supertank (edict_t *self)
|
|||
}
|
||||
|
||||
self->common_name = "Supertank";
|
||||
self->class_id = ENTITY_MONSTER_SUPERTANK;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -1074,6 +1074,7 @@ void SP_monster_tank (edict_t *self)
|
|||
self->gib_health = -400;
|
||||
self->common_name = "Tank";
|
||||
}
|
||||
self->class_id = ENTITY_MONSTER_TANK;
|
||||
|
||||
if (!self->mass)
|
||||
self->mass = 500;
|
||||
|
|
|
@ -671,6 +671,7 @@ void turret_wall_spawn (edict_t *turret)
|
|||
|
||||
ent = G_Spawn();
|
||||
ent->classname = "turret_wall";
|
||||
ent->class_id = ENTITY_TURRET_WALL;
|
||||
VectorCopy (turret->s.origin, ent->s.origin);
|
||||
VectorCopy (turret->s.angles, turret->deploy_angles);
|
||||
VectorCopy (turret->s.angles, ent->s.angles);
|
||||
|
@ -1179,6 +1180,7 @@ void SP_monster_turret (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Sentry Turret";
|
||||
self->class_id = ENTITY_MONSTER_TURRET;
|
||||
|
||||
// PMM - turrets don't get mad at monsters, and visa versa
|
||||
self->monsterinfo.aiflags |= AI_IGNORE_SHOTS;
|
||||
|
|
|
@ -1766,6 +1766,7 @@ void SP_monster_widow (edict_t *self)
|
|||
self->monsterinfo.power_armor_power = self->powerarmor;
|
||||
}
|
||||
self->common_name = "Black Widow";
|
||||
self->class_id = ENTITY_MONSTER_WIDOW;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -1276,11 +1276,12 @@ void SP_monster_widow2 (edict_t *self)
|
|||
self->monsterinfo.checkattack = Widow2_CheckAttack;
|
||||
|
||||
if (!self->blood_type)
|
||||
self->blood_type = 2; //sparks
|
||||
self->blood_type = 2; // sparks
|
||||
else
|
||||
self->fogclip |= 2; //custom bloodtype flag
|
||||
self->fogclip |= 2; // custom bloodtype flag
|
||||
|
||||
self->common_name = "Black Widow";
|
||||
self->class_id = ENTITY_MONSTER_WIDOW2;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -93,10 +93,13 @@ void SP_misc_teleporter_dest (edict_t *ent);
|
|||
/*QUAKED info_player_start (1 0 0) (-16 -16 -24) (16 16 32)
|
||||
The normal starting point for a level.
|
||||
*/
|
||||
void SP_info_player_start(edict_t *self)
|
||||
void SP_info_player_start (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_INFO_PLAYER_START;
|
||||
|
||||
if (!coop->value)
|
||||
return;
|
||||
|
||||
if (Q_stricmp(level.mapname, "security") == 0)
|
||||
{
|
||||
// invoke one of our gross, ugly, disgusting hacks
|
||||
|
@ -113,7 +116,7 @@ NO_PAD - don't make a pad
|
|||
count - the number of maxclients must be less than this for it to spawn.
|
||||
if you don't have a func_dm_wall in your map, don't enter a value.
|
||||
*/
|
||||
void SP_info_player_deathmatch(edict_t *self)
|
||||
void SP_info_player_deathmatch (edict_t *self)
|
||||
{
|
||||
if (!deathmatch->value)
|
||||
{
|
||||
|
@ -121,7 +124,7 @@ void SP_info_player_deathmatch(edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
//Mappack - this makes sure players don't get spawned in an area sealed by a func_dm_wall
|
||||
// Mappack - this makes sure players don't get spawned in an area sealed by a func_dm_wall
|
||||
if (self->count > 2)
|
||||
{
|
||||
if (self->count <= game.maxclients)
|
||||
|
@ -131,16 +134,18 @@ void SP_info_player_deathmatch(edict_t *self)
|
|||
}
|
||||
}
|
||||
|
||||
//Mappack - this removes the pad if a flag of 1 is set.
|
||||
// Mappack - this removes the pad if a flag of 1 is set.
|
||||
if (!(self->spawnflags & 1))
|
||||
SP_misc_teleporter_dest (self);
|
||||
|
||||
self->class_id = ENTITY_INFO_PLAYER_DEATHMATCH;
|
||||
}
|
||||
|
||||
/*QUAKED info_player_coop (1 0 1) (-16 -16 -24) (16 16 32)
|
||||
potential spawning position for coop games
|
||||
*/
|
||||
|
||||
void SP_info_player_coop(edict_t *self)
|
||||
void SP_info_player_coop (edict_t *self)
|
||||
{
|
||||
if (!coop->value)
|
||||
{
|
||||
|
@ -148,6 +153,8 @@ void SP_info_player_coop(edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_INFO_PLAYER_COOP;
|
||||
|
||||
if ((Q_stricmp(level.mapname, "jail2") == 0) ||
|
||||
(Q_stricmp(level.mapname, "jail4") == 0) ||
|
||||
(Q_stricmp(level.mapname, "mine1") == 0) ||
|
||||
|
@ -173,24 +180,28 @@ void SP_info_player_coop(edict_t *self)
|
|||
potential spawning position for coop games on rmine2 where lava level
|
||||
needs to be checked
|
||||
*/
|
||||
void SP_info_player_coop_lava(edict_t *self)
|
||||
void SP_info_player_coop_lava (edict_t *self)
|
||||
{
|
||||
if (!coop->value)
|
||||
{
|
||||
G_FreeEdict (self);
|
||||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_INFO_PLAYER_COOP_LAVA;
|
||||
}
|
||||
|
||||
/*QUAKED info_player_intermission (1 0 1) (-16 -16 -24) (16 16 32) LETTERBOX
|
||||
The deathmatch intermission point will be at one of these
|
||||
Use 'angles' instead of 'angle', so you can set pitch or roll as well as yaw. 'pitch yaw roll'
|
||||
*/
|
||||
void SP_info_player_intermission(edict_t *self) //was void
|
||||
void SP_info_player_intermission (edict_t *self) //was void
|
||||
{
|
||||
//Knightmare- hack for Paradist Lost
|
||||
self->class_id = ENTITY_INFO_PLAYER_INTERMISSION;
|
||||
|
||||
// Knightmare- hack for Paradise Lost
|
||||
if (Q_stricmp(level.mapname, "coconut1") == 0)
|
||||
VectorSet(self->s.angles,0,270,0);
|
||||
VectorSet (self->s.angles, 0, 270, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ void PlayerNoise(edict_t *who, vec3_t where, int type)
|
|||
{
|
||||
noise = G_Spawn();
|
||||
noise->classname = "player_noise";
|
||||
noise->class_id = ENTITY_PLAYER_NOISE;
|
||||
VectorSet (noise->mins, -8, -8, -8);
|
||||
VectorSet (noise->maxs, 8, 8, 8);
|
||||
noise->owner = who;
|
||||
|
@ -126,6 +127,7 @@ void PlayerNoise(edict_t *who, vec3_t where, int type)
|
|||
|
||||
noise = G_Spawn();
|
||||
noise->classname = "player_noise";
|
||||
noise->class_id = ENTITY_PLAYER_NOISE;
|
||||
VectorSet (noise->mins, -8, -8, -8);
|
||||
VectorSet (noise->maxs, 8, 8, 8);
|
||||
noise->owner = who;
|
||||
|
|
|
@ -923,6 +923,7 @@ void SP_monster_autocannon (edict_t *self)
|
|||
|
||||
// Lazarus
|
||||
self->common_name = "Autocannon";
|
||||
self->class_id = ENTITY_MONSTER_AUTOCANNON;
|
||||
|
||||
gi.linkentity(self);
|
||||
}
|
||||
|
|
|
@ -1807,6 +1807,7 @@ void SP_monster_zboss (edict_t *self)
|
|||
self->blood_type = 2; // sparks
|
||||
|
||||
self->common_name = "Titan";
|
||||
self->class_id = ENTITY_MONSTER_ZBOSS;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -497,6 +497,7 @@ void SP_monster_handler (edict_t *self)
|
|||
self->monsterinfo.flies = 0.40;
|
||||
|
||||
self->common_name = "Enforcer with HellHound";
|
||||
self->class_id = ENTITY_MONSTER_HANDLER;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
|
|
@ -643,6 +643,7 @@ void SP_monster_hound (edict_t *self)
|
|||
}
|
||||
|
||||
self->common_name = "HellHound";
|
||||
self->class_id = ENTITY_MONSTER_HOUND;
|
||||
|
||||
gi.linkentity (self);
|
||||
|
||||
|
@ -720,6 +721,7 @@ void hound_createHound (edict_t *self, float healthPercent)
|
|||
hound->monsterinfo.flies = 0.60;
|
||||
|
||||
hound->common_name = "HellHound";
|
||||
hound->class_id = ENTITY_MONSTER_HOUND;
|
||||
|
||||
// monster_start(hound);
|
||||
|
||||
|
|
|
@ -119,6 +119,9 @@ void SP_misc_securitycamera (edict_t *self)
|
|||
self->takedamage = DAMAGE_IMMORTAL; // health will not be deducted
|
||||
self->pain = camera_pain;
|
||||
|
||||
self->common_name = "Security Camera";
|
||||
self->class_id = ENTITY_MISC_SECURITYCAMERA;
|
||||
|
||||
gi.linkentity(self);
|
||||
}
|
||||
|
||||
|
@ -351,6 +354,10 @@ void fire_empnuke (edict_t *ent, vec3_t center, int radius)
|
|||
|
||||
// empnuke->think = G_FreeEdict;
|
||||
// empnuke->nextthink = level.time + 30;
|
||||
|
||||
empnuke->common_name = "EMP Nuke Center";
|
||||
empnuke->class_id = ENTITY_Z_EMPNUKECENTER;
|
||||
|
||||
gi.linkentity (empnuke);
|
||||
|
||||
// gi.sound(empnuke, CHAN_VOICE, gi.soundindex("items/empnuke/emp_exp.wav"), 1, ATTN_NORM, 0);
|
||||
|
@ -466,6 +473,10 @@ void Use_PlasmaShield (edict_t *ent, gitem_t *item)
|
|||
PlasmaShield->think = PlasmaShield_die;
|
||||
PlasmaShield->nextthink = level.time + sk_plasmashield_life->value; // was 10
|
||||
|
||||
PlasmaShield->common_name = "Plasma Shield";
|
||||
PlasmaShield->class_id = ENTITY_Z_PLASMASHIELD;
|
||||
|
||||
|
||||
gi.linkentity (PlasmaShield);
|
||||
}
|
||||
//#endif // USE_ZAERO_ITEMS_WEAPONS
|
||||
|
@ -492,6 +503,9 @@ void setupCrate (edict_t *self)
|
|||
self->think = M_droptofloor;
|
||||
self->nextthink = level.time + 2 * FRAMETIME;
|
||||
|
||||
self->common_name = "Pushable Crate";
|
||||
self->class_id = ENTITY_MISC_CRATE;
|
||||
|
||||
gi.linkentity(self);
|
||||
}
|
||||
|
||||
|
@ -544,6 +558,9 @@ void SP_misc_seat (edict_t *self)
|
|||
|
||||
// make this pushable
|
||||
setupCrate(self);
|
||||
|
||||
self->common_name = "Ejection Seat";
|
||||
self->class_id = ENTITY_MISC_SEAT;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -584,6 +601,8 @@ void SP_misc_commdish (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_MISC_COMMDISH;
|
||||
|
||||
self->solid = SOLID_BBOX;
|
||||
self->movetype = MOVETYPE_STEP;
|
||||
|
||||
|
@ -671,6 +690,8 @@ void barrier_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *
|
|||
|
||||
void SP_func_barrier (edict_t *self)
|
||||
{
|
||||
self->class_id = ENTITY_FUNC_BARRIER;
|
||||
|
||||
self->solid = SOLID_BBOX;
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->s.modelindex = gi.modelindex("models/objects/wall/tris.md2");
|
||||
|
|
|
@ -1281,7 +1281,9 @@ void SP_monster_sentien (edict_t *self)
|
|||
}
|
||||
if (!self->monsterinfo.flies)
|
||||
self->monsterinfo.flies = 0.10;
|
||||
|
||||
self->common_name = "Sentien";
|
||||
self->class_id = ENTITY_MONSTER_SENTIEN;
|
||||
// end Lazarus
|
||||
|
||||
gi.linkentity (self);
|
||||
|
|
|
@ -88,12 +88,13 @@ void SP_trigger_laser (edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->class_id = ENTITY_TRIGGER_LASER;
|
||||
|
||||
// if no wait, set default
|
||||
if (!self->wait)
|
||||
{
|
||||
self->wait = 4;
|
||||
}
|
||||
|
||||
G_SetMovedir (self->s.angles, self->movedir);
|
||||
self->s.skinnum = 0xf2f2f0f0; // colour
|
||||
self->s.frame = 2; // diameter
|
||||
|
|
|
@ -474,6 +474,9 @@ qboolean fire_lasertripbomb (edict_t *self, vec3_t start, vec3_t dir, float time
|
|||
bomb->nextthink = level.time + FRAMETIME;
|
||||
bomb->think = tripbomb_think;
|
||||
|
||||
bomb->common_name = "Laser Trip Bomb";
|
||||
bomb->class_id = ENTITY_Z_TBOMB;
|
||||
|
||||
// remove the oldest trip bomb
|
||||
removeOldest();
|
||||
|
||||
|
@ -682,7 +685,7 @@ void SP_misc_lasertripbomb (edict_t *bomb)
|
|||
}
|
||||
|
||||
// set up ourself
|
||||
setupBomb(bomb, "misc_ired", sk_tbomb_damage->value, sk_tbomb_radius->value);
|
||||
setupBomb (bomb, "misc_ired", sk_tbomb_damage->value, sk_tbomb_radius->value);
|
||||
|
||||
if (bomb->targetname)
|
||||
{
|
||||
|
@ -693,6 +696,10 @@ void SP_misc_lasertripbomb (edict_t *bomb)
|
|||
bomb->think = create_tripbomb_laser;
|
||||
bomb->nextthink = level.time + TBOMB_DELAY;
|
||||
}
|
||||
|
||||
bomb->common_name = "Laser Trip Bomb";
|
||||
bomb->class_id = ENTITY_Z_TBOMB;
|
||||
|
||||
gi.linkentity(bomb);
|
||||
}
|
||||
//#endif // USE_ZAERO_ITEMS_WEAPONS
|
||||
|
@ -1113,6 +1120,9 @@ void fire_flare (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed,
|
|||
flare->dmg_radius = damage_radius;
|
||||
flare->classname = "flare";
|
||||
|
||||
flare->common_name = "Flare";
|
||||
flare->class_id = ENTITY_Z_FLARE;
|
||||
|
||||
if (self->client)
|
||||
check_dodge (self, flare->s.origin, dir, speed);
|
||||
|
||||
|
|
Loading…
Reference in a new issue