IDEA: make lua's projectile events faster [fixed]

IDEA: make lua's projectile events faster [fixed]

Post Reply
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

IDEA: make lua's projectile events faster [fixed]

Post by jK » 23 Apr 2011, 18:15

Currently ProjectileCreated and co are called for all projectiles created on the map (in synced code, for unsynced it does an ally owner check). This spams a HELL LOT of lua callins, making the usage of this events extremely slow (imagine all those EMG weapons on Flashes). So to speed it up it needs a callout function to limit the events to wanted projectiles (as it is done with the Explosion callin already, see Spring.SetWatchWeapon).
Also it needs something like Spring.GetProjectilesInBox(x1,z1,x2,z2).

important files that need to get touched:
[list][*]LuaRules.h/cpp
[*]LuaSyncedRead.h/cpp
[*]EventHandler.h?[/list]
0 x

Post Reply

Return to “New Developer Discussion”

cron