mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-13 22:22:13 +00:00
breakables should now respawn when the round restarts( when g_teamplay:SpawnPlayers() is called to be exact)
This commit is contained in:
parent
69a08b2874
commit
0321c5a782
2 changed files with 23 additions and 3 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.28 2002/04/05 06:50:25 blaze
|
||||
// breakables should now respawn when the round restarts( when g_teamplay:SpawnPlayers() is called to be exact)
|
||||
//
|
||||
// Revision 1.27 2002/04/03 04:41:33 blaze
|
||||
// woops, forgot one change in the breakable code
|
||||
//
|
||||
|
@ -574,7 +577,7 @@ void SP_func_breakable( gentity_t *ent ) {
|
|||
}
|
||||
else
|
||||
{
|
||||
G_Printf("^2ERROR: broken breakable name (%s)\n", rq3_breakables[id]);
|
||||
G_Printf("^2ERROR: broken breakable name (%s)\n", name);
|
||||
G_FreeEntity( ent );
|
||||
return;
|
||||
}
|
||||
|
@ -679,7 +682,9 @@ void G_BreakGlass( gentity_t *ent, gentity_t *inflictor, gentity_t *attacker, ve
|
|||
mod = MOD_TRIGGER_HURT;
|
||||
func_breakable_die(ent, inflictor, attacker, damage, mod);
|
||||
}
|
||||
G_FreeEntity( ent );
|
||||
//unlink it instead of freeing
|
||||
trap_UnlinkEntity(ent);
|
||||
//G_FreeEntity( ent );
|
||||
//G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
|
||||
switch ( shiftCount )
|
||||
{
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.58 2002/04/05 06:50:25 blaze
|
||||
// breakables should now respawn when the round restarts( when g_teamplay:SpawnPlayers() is called to be exact)
|
||||
//
|
||||
// Revision 1.57 2002/04/03 15:51:01 jbravo
|
||||
// Small warning fixes
|
||||
//
|
||||
|
@ -441,6 +444,7 @@ void CleanLevel()
|
|||
} else if (ent->item->giType == IT_AMMO) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int CheckForWinner()
|
||||
|
@ -632,7 +636,7 @@ void CheckForUnevenTeams(gentity_t *player)
|
|||
|
||||
void SpawnPlayers()
|
||||
{
|
||||
gentity_t *player;
|
||||
gentity_t *player, *ent;
|
||||
gclient_t *client;
|
||||
int clientNum, i;
|
||||
|
||||
|
@ -668,6 +672,17 @@ void SpawnPlayers()
|
|||
ClientUserinfoChanged(clientNum);
|
||||
client->sess.teamSpawn = qfalse;
|
||||
}
|
||||
//Blaze: May aswell respawn breakables here
|
||||
for (i=0;i<level.num_entities; i++)
|
||||
{
|
||||
ent = &g_entities[i];
|
||||
if (!strcmp(ent->classname,"func_breakable"))
|
||||
{
|
||||
//re-link all unlinked breakables
|
||||
trap_LinkEntity(ent);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Let the player Choose the weapon and/or item he wants */
|
||||
|
|
Loading…
Reference in a new issue