mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Fix Team Arena team base models not dropping to floor
Team Arena's Overload gametype has red and blue team Obelisk base objects. It uses separate entities for visual and damage. Only the damageable entity was dropped to floor. Leaving model floating off the ground. Team Arena's Harvester base has the same problem. Model entity floats in air but trigger entity drops to floor. Drop all Team Arena team base models to floor. Fixes CTF, 1Flag, Overload, and Harvester base models.
This commit is contained in:
parent
f7c3276fe8
commit
f19efb77c8
1 changed files with 33 additions and 21 deletions
|
@ -1313,9 +1313,8 @@ static void ObeliskPain( gentity_t *self, gentity_t *attacker, int damage ) {
|
|||
AddScore(attacker, self->r.currentOrigin, actualDamage);
|
||||
}
|
||||
|
||||
gentity_t *SpawnObelisk( vec3_t origin, int team, int spawnflags) {
|
||||
trace_t tr;
|
||||
vec3_t dest;
|
||||
// spawn invisible damagable obelisk entity / harvester base trigger.
|
||||
gentity_t *SpawnObelisk( vec3_t origin, vec3_t mins, vec3_t maxs, int team ) {
|
||||
gentity_t *ent;
|
||||
|
||||
ent = G_Spawn();
|
||||
|
@ -1324,8 +1323,8 @@ gentity_t *SpawnObelisk( vec3_t origin, int team, int spawnflags) {
|
|||
VectorCopy( origin, ent->s.pos.trBase );
|
||||
VectorCopy( origin, ent->r.currentOrigin );
|
||||
|
||||
VectorSet( ent->r.mins, -15, -15, 0 );
|
||||
VectorSet( ent->r.maxs, 15, 15, 87 );
|
||||
VectorCopy( mins, ent->r.mins );
|
||||
VectorCopy( maxs, ent->r.maxs );
|
||||
|
||||
ent->s.eType = ET_GENERAL;
|
||||
ent->flags = FL_NO_KNOCKBACK;
|
||||
|
@ -1344,7 +1343,26 @@ gentity_t *SpawnObelisk( vec3_t origin, int team, int spawnflags) {
|
|||
ent->touch = ObeliskTouch;
|
||||
}
|
||||
|
||||
if ( spawnflags & 1 ) {
|
||||
G_SetOrigin( ent, ent->s.origin );
|
||||
|
||||
ent->spawnflags = team;
|
||||
|
||||
trap_LinkEntity( ent );
|
||||
|
||||
return ent;
|
||||
}
|
||||
|
||||
// setup entity for team base model / obelisk model.
|
||||
void ObeliskInit( gentity_t *ent ) {
|
||||
trace_t tr;
|
||||
vec3_t dest;
|
||||
|
||||
ent->s.eType = ET_TEAM;
|
||||
|
||||
VectorSet( ent->r.mins, -15, -15, 0 );
|
||||
VectorSet( ent->r.maxs, 15, 15, 87 );
|
||||
|
||||
if ( ent->spawnflags & 1 ) {
|
||||
// suspended
|
||||
G_SetOrigin( ent, ent->s.origin );
|
||||
} else {
|
||||
|
@ -1368,12 +1386,6 @@ gentity_t *SpawnObelisk( vec3_t origin, int team, int spawnflags) {
|
|||
G_SetOrigin( ent, tr.endpos );
|
||||
}
|
||||
}
|
||||
|
||||
ent->spawnflags = team;
|
||||
|
||||
trap_LinkEntity( ent );
|
||||
|
||||
return ent;
|
||||
}
|
||||
|
||||
/*QUAKED team_redobelisk (1 0 0) (-16 -16 0) (16 16 8)
|
||||
|
@ -1385,16 +1397,16 @@ void SP_team_redobelisk( gentity_t *ent ) {
|
|||
G_FreeEntity(ent);
|
||||
return;
|
||||
}
|
||||
ent->s.eType = ET_TEAM;
|
||||
ObeliskInit( ent );
|
||||
if ( g_gametype.integer == GT_OBELISK ) {
|
||||
obelisk = SpawnObelisk( ent->s.origin, TEAM_RED, ent->spawnflags );
|
||||
obelisk = SpawnObelisk( ent->s.origin, ent->r.mins, ent->r.maxs, TEAM_RED );
|
||||
obelisk->activator = ent;
|
||||
// initial obelisk health value
|
||||
ent->s.modelindex2 = 0xff;
|
||||
ent->s.frame = 0;
|
||||
}
|
||||
if ( g_gametype.integer == GT_HARVESTER ) {
|
||||
obelisk = SpawnObelisk( ent->s.origin, TEAM_RED, ent->spawnflags );
|
||||
obelisk = SpawnObelisk( ent->s.origin, ent->r.mins, ent->r.maxs, TEAM_RED );
|
||||
obelisk->activator = ent;
|
||||
}
|
||||
ent->s.modelindex = TEAM_RED;
|
||||
|
@ -1410,16 +1422,16 @@ void SP_team_blueobelisk( gentity_t *ent ) {
|
|||
G_FreeEntity(ent);
|
||||
return;
|
||||
}
|
||||
ent->s.eType = ET_TEAM;
|
||||
ObeliskInit( ent );
|
||||
if ( g_gametype.integer == GT_OBELISK ) {
|
||||
obelisk = SpawnObelisk( ent->s.origin, TEAM_BLUE, ent->spawnflags );
|
||||
obelisk = SpawnObelisk( ent->s.origin, ent->r.mins, ent->r.maxs, TEAM_BLUE );
|
||||
obelisk->activator = ent;
|
||||
// initial obelisk health value
|
||||
ent->s.modelindex2 = 0xff;
|
||||
ent->s.frame = 0;
|
||||
}
|
||||
if ( g_gametype.integer == GT_HARVESTER ) {
|
||||
obelisk = SpawnObelisk( ent->s.origin, TEAM_BLUE, ent->spawnflags );
|
||||
obelisk = SpawnObelisk( ent->s.origin, ent->r.mins, ent->r.maxs, TEAM_BLUE );
|
||||
obelisk->activator = ent;
|
||||
}
|
||||
ent->s.modelindex = TEAM_BLUE;
|
||||
|
@ -1433,10 +1445,10 @@ void SP_team_neutralobelisk( gentity_t *ent ) {
|
|||
G_FreeEntity(ent);
|
||||
return;
|
||||
}
|
||||
ent->s.eType = ET_TEAM;
|
||||
ObeliskInit( ent );
|
||||
if ( g_gametype.integer == GT_HARVESTER) {
|
||||
neutralObelisk = SpawnObelisk( ent->s.origin, TEAM_FREE, ent->spawnflags);
|
||||
neutralObelisk->spawnflags = TEAM_FREE;
|
||||
neutralObelisk = SpawnObelisk( ent->s.origin, ent->r.mins, ent->r.maxs, TEAM_FREE );
|
||||
neutralObelisk->activator = ent;
|
||||
}
|
||||
ent->s.modelindex = TEAM_FREE;
|
||||
trap_LinkEntity(ent);
|
||||
|
|
Loading…
Reference in a new issue