src/tron/gWinZone.h File Reference

#include "eNetGameObject.h"
#include <vector>
#include "gCycle.h"
#include "rColor.h"
#include "tFunction.h"

Include dependency graph for gWinZone.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gZone
 basic zone class: handles rendering and entwork syncing More...
class  gWinZoneHack
 win zone: lets players who enter win the round More...
class  gDeathZoneHack
 death zone: kills players who enter More...
class  gBaseZoneHack
 base zone: belongs to a team, enemy players who manage to stay inside win the round (will be replaced More...

Functions

gZonesg_CreateWinDeathZone (eGrid *grid, const eCoord &pos)
 creates a win or death zone (according to configuration) at the specified position

Variables

REAL sg_expansionSpeed
REAL sg_initialSize
REAL sg_conquestDecayRate
REAL sg_conquestRate
REAL sg_defendRate


Function Documentation

gZone* sg_CreateWinDeathZone ( eGrid grid,
const eCoord &  pos 
)

creates a win or death zone (according to configuration) at the specified position

Definition at line 61 of file gWinZone.cpp.

References NULL, se_GameTime(), gZone::SetExpansionSpeed(), gZone::SetRadius(), gZone::SetReferenceTime(), gZone::SetRotationSpeed(), sg_expansionSpeed, sg_initialSize, sg_zoneDeath, sn_ConsoleOut(), gCycle::Timestep(), and tNEW.

Referenced by gGame::Analysis().

00062 {
00063     gZone * ret = NULL;
00064     if ( sg_zoneDeath )
00065     {
00066         ret = tNEW( gDeathZoneHack( grid, pos ) );
00067         sn_ConsoleOut( "$instant_death_activated" );
00068     }
00069     else
00070     {
00071         ret = tNEW( gWinZoneHack( grid, pos ) );
00072         sn_ConsoleOut( "$instant_win_activated" );
00073     }
00074 
00075     // initialize radius and expansion speed
00076     static_cast<eGameObject*>(ret)->Timestep( se_GameTime() );
00077     ret->SetReferenceTime();
00078     ret->SetRadius( sg_initialSize );
00079     ret->SetExpansionSpeed( sg_expansionSpeed );
00080     ret->SetRotationSpeed( .3f );
00081 
00082     return ret;
00083 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

REAL sg_conquestDecayRate

Definition at line 774 of file gWinZone.cpp.

Referenced by gBaseZoneHack::Timestep().

REAL sg_conquestRate

Definition at line 772 of file gWinZone.cpp.

Referenced by gBaseZoneHack::Timestep().

REAL sg_defendRate

Definition at line 773 of file gWinZone.cpp.

Referenced by gBaseZoneHack::OnVanish(), and gBaseZoneHack::Timestep().

REAL sg_expansionSpeed

Definition at line 54 of file gWinZone.cpp.

Referenced by zZone::ReadSync(), gZone::ReadSync(), and sg_CreateWinDeathZone().

REAL sg_initialSize

Definition at line 55 of file gWinZone.cpp.

Referenced by zZone::ReadSync(), gZone::ReadSync(), and sg_CreateWinDeathZone().


Generated on Sat Mar 15 23:18:34 2008 for Armagetron Advanced by  doxygen 1.5.4