All pastes #144665 Raw Edit

Untitled

public text v1 · immutable
#144665 ·published 2006-08-22 16:56 UTC
rendered paste body
*** playing.cxx 5 Aug 2006 23:54:13 -0000       2.146.2.28
--- playing.cxx 22 Aug 2006 03:53:20 -0000
***************
*** 3406,3412 ****
  
  static void           checkEnvironment()
  {
!   if (!myTank || myTank->getTeam() == ObserverTeam) return;
  
    // skip this if i'm dead or paused
    if (!myTank->isAlive() || myTank->isPaused()) return;
--- 3406,3433 ----
  
  static void           checkEnvironment()
  {
!   if (!myTank || myTank->getTeam() == ObserverTeam) {
!     // Check for an observed tanks hit.
!     Player *target = ROAM.getTargetTank();
!     const ShotPath* hit = NULL;
!     float minTime = Infinity;
!     int i;
! 
!     if (!myTank) return;
!     if (ROAM.getMode() != Roaming::roamViewFP) return;
!         //Only works if we are driving with the target
!     myTank->checkHit(myTank, hit, minTime);
!     for (i = 0; i < curMaxPlayers; i++)
!       if (player[i])
!         myTank->checkHit(player[i], hit, minTime);
!     if (hit){
!       Player* hitter = lookupPlayer(hit->getPlayer());
!       std::string msg(" was hit by ");
!       msg += hitter->getCallSign();
!       addMessage(target, msg);
!     }
!     return;
!   }
  
    // skip this if i'm dead or paused
    if (!myTank->isAlive() || myTank->isPaused()) return;