#include <gWinZone.h>
Public Member Functions | |
gWinZoneHack (eGrid *grid, const eCoord &pos) | |
local constructor | |
gWinZoneHack (nMessage &m) | |
network constructor | |
~gWinZoneHack () | |
destructor | |
Private Member Functions | |
virtual void | OnEnter (gCycle *target, REAL time) |
reacts on objects inside the zone (declares them the winner) |
Definition at line 120 of file gWinZone.h.
gWinZoneHack::gWinZoneHack | ( | eGrid * | grid, | |
const eCoord & | pos | |||
) |
local constructor
grid | Grid to put the zone into | |
pos | Position to spawn the zone at |
Definition at line 588 of file gWinZone.cpp.
References tColor::b_, gZone::color_, tColor::g_, and tColor::r_.
00589 :gZone( grid, pos ) 00590 { 00591 color_.r_ = 0.0f; 00592 color_.g_ = 1.0f; 00593 color_.b_ = 0.0f; 00594 }
gWinZoneHack::gWinZoneHack | ( | nMessage & | m | ) |
network constructor
m | Message to read creation data from | |
null |
Definition at line 607 of file gWinZone.cpp.
00608 : gZone( m ) 00609 { 00610 }
gWinZoneHack::~gWinZoneHack | ( | void | ) |
reacts on objects inside the zone (declares them the winner)
target | the cycle that has been found inside the zone | |
time | the current time |
Reimplemented from gZone.
Definition at line 636 of file gWinZone.cpp.
References ePlayerNetID::CurrentTeam(), gZone::GetExpansionSpeed(), gZone::GetRadius(), eNetGameObject::Player(), nNetObject::RequestSync(), gZone::SetExpansionSpeed(), gZone::SetReferenceTime(), and sg_DeclareWinner().
00637 { 00638 static const char* message="$player_win_instant"; 00639 sg_DeclareWinner( target->Player()->CurrentTeam(), message ); 00640 00641 // let zone vanish 00642 if ( GetExpansionSpeed() >= 0 ) 00643 { 00644 SetReferenceTime(); 00645 SetExpansionSpeed( -GetRadius()*.5 ); 00646 RequestSync(); 00647 } 00648 }