mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-23 03:52:50 +00:00
use drawRect instead of putimagedata for units (25% cpu usage reduction)
This commit is contained in:
@@ -5,7 +5,7 @@ export const devConfig = new class extends DefaultConfig {
|
||||
unitInfo(type: UnitType): UnitInfo {
|
||||
const info = super.unitInfo(type)
|
||||
const oldCost = info.cost
|
||||
info.cost = (p: Player) => oldCost(p) / 10000
|
||||
info.cost = (p: Player) => 0 * oldCost(p) / 10000
|
||||
return info
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export const devConfig = new class extends DefaultConfig {
|
||||
return 95
|
||||
}
|
||||
numSpawnPhaseTurns(): number {
|
||||
return 80
|
||||
return 40
|
||||
}
|
||||
gameCreationRate(): number {
|
||||
return 20 * 1000
|
||||
|
||||
Reference in New Issue
Block a user