mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Optimize RandomMagazine() called when deploying to tactical sector (by sun_alf)
Timings Before: RandomMagazine: 90044 us (total 90044 us) RandomMagazine: 90007 us (total 180051 us) RandomMagazine: 100009 us (total 280060 us) After: RandomMagazine: 0 us (total 0 us) RandomMagazine: 0 us (total 0 us) RandomMagazine: 0 us (total 0 us) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9354 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-1
@@ -398,7 +398,8 @@ typedef struct
|
||||
UINT8 ubAmmoType;
|
||||
UINT8 ubMagType;
|
||||
|
||||
UINT32 uiIndex;
|
||||
// sun_alf: once Magazines.xml is parsed, classIndex of a mag is index in Magazine[], and uiIndex field is not in use anymore,
|
||||
UINT32 uiIndex; // so let's use it as itemId, i.e. back reference to Item[].
|
||||
} MAGTYPE;
|
||||
|
||||
typedef struct
|
||||
|
||||
Reference in New Issue
Block a user