mirror of
https://github.com/ApfelTeeSaft/PlanetFleet.git
synced 2026-08-26 19:33:38 +00:00
correctly checking rate of fire
This commit is contained in:
@@ -35,7 +35,7 @@ units = {
|
||||
health = {500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500},
|
||||
cost = {500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500},
|
||||
range = {15, 15, 14, 14, 13, 13, 12, 12, 15, 25},
|
||||
rateOfFire = {5000, 100, 100, 100, 100, 100, 100},
|
||||
rateOfFire = {50, 100, 100, 100, 100, 100, 100},
|
||||
|
||||
unitCornerPoints = {
|
||||
{
|
||||
|
||||
+4
-1
@@ -224,8 +224,11 @@ namespace battleship{
|
||||
else{
|
||||
pursuingTarget = false;
|
||||
|
||||
if(getTime() - lastFireTime > rateOfFire)
|
||||
if(getTime() - lastFireTime > rateOfFire){
|
||||
fire();
|
||||
|
||||
lastFireTime = getTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user