Changeset 288 for code/branches/main_reto_vs05/src/weapon
- Timestamp:
- Nov 27, 2007, 11:49:42 PM (17 years ago)
- Location:
- code/branches/main_reto_vs05/src/weapon
- Files:
-
- 1 deleted
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/main_reto_vs05/src/weapon/barrel_gun.cc
r232 r288 95 95 void BarrelGun::primaryFiring(unsigned int time) 96 96 { 97 if (time > 1000/primaryFiringRate_)97 if (time > (unsigned int)1000/primaryFiringRate_) 98 98 { 99 99 currentState_ = IDLE; … … 133 133 void BarrelGun::secondaryFiring(unsigned int time) 134 134 { 135 if (time > 1000/secondaryFiringRate_)135 if (time > (unsigned int)1000/secondaryFiringRate_) 136 136 currentState_ = IDLE; 137 137 } -
code/branches/main_reto_vs05/src/weapon/base_weapon.cc
r232 r288 98 98 } 99 99 100 switch (currentState_)100 if (currentState_ != IDLE) 101 101 { 102 case IDLE: 102 switch (currentState_) 103 { 104 case PRIMARY_FIRE: 105 primaryFiring((unsigned int)(time - actionStartTime_)); 106 break; 107 108 case SECONDARY_FIRE: 109 secondaryFiring((unsigned int)(time - actionStartTime_)); 110 break; 111 112 case RELOADING: 113 break; 114 115 case CHANGING_AMMO: 116 break; 117 } 118 } 119 120 if (currentState_ == IDLE) 121 { 103 122 // first, process next action 104 123 if (nextAction_ != NOTHING) … … 142 161 } 143 162 } 144 145 break;146 147 case PRIMARY_FIRE:148 primaryFiring((unsigned int)(time - actionStartTime_));149 break;150 151 case SECONDARY_FIRE:152 secondaryFiring((unsigned int)(time - actionStartTime_));153 break;154 155 case RELOADING:156 break;157 158 case CHANGING_AMMO:159 break;160 163 } 161 164
Note: See TracChangeset
for help on using the changeset viewer.