mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 05:20:43 +00:00
- removed the limit of 64 on-state switches from the init code.
No other place in the engine needs this, it was just the chosen size for a local check array.
This commit is contained in:
parent
ba3e8a9842
commit
8e17f1f0f5
3 changed files with 9 additions and 24 deletions
|
@ -40,9 +40,8 @@ BEGIN_DUKE_NS
|
|||
|
||||
void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac)
|
||||
{
|
||||
DAngle kang;
|
||||
int k, p;
|
||||
int l, t1, t3, t4;
|
||||
int t1, t3, t4;
|
||||
tspritetype* t;
|
||||
DDukeActor* h;
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ void spriteinit_d(DDukeActor* actor, TArray<DDukeActor*>& actors)
|
|||
void prelevel_d(int g, TArray<DDukeActor*>& actors)
|
||||
{
|
||||
int i, j, lotaglist;
|
||||
short lotags[65];
|
||||
TArray<short> lotags;
|
||||
|
||||
prelevel_common(g);
|
||||
|
||||
|
@ -324,17 +324,10 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
|
|||
case POWERSWITCH1ON:
|
||||
case LOCKSWITCH1ON:
|
||||
case POWERSWITCH2ON:
|
||||
for (j = 0; j < lotaglist; j++)
|
||||
if (actor->spr.lotag == lotags[j])
|
||||
break;
|
||||
|
||||
if (j == lotaglist)
|
||||
j = lotags.Find(actor->spr.lotag);
|
||||
if (j == lotags.Size())
|
||||
{
|
||||
lotags[lotaglist] = actor->spr.lotag;
|
||||
lotaglist++;
|
||||
if (lotaglist > 64)
|
||||
I_Error("Too many switches (64 max).");
|
||||
|
||||
lotags.Push(actor->spr.lotag);
|
||||
DukeStatIterator it1(STAT_EFFECTOR);
|
||||
while (auto ac = it1.Next())
|
||||
{
|
||||
|
|
|
@ -409,7 +409,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
int i;
|
||||
int j;
|
||||
int lotaglist;
|
||||
short lotags[65];
|
||||
TArray<short> lotags;
|
||||
int speed = 0;
|
||||
int dist;
|
||||
int sound;
|
||||
|
@ -631,17 +631,10 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
case CHICKENPLANTBUTTON:
|
||||
case CHICKENPLANTBUTTONON:
|
||||
|
||||
for (j = 0; j < lotaglist; j++)
|
||||
if (ac->spr.lotag == lotags[j])
|
||||
break;
|
||||
|
||||
if (j == lotaglist)
|
||||
j = lotags.Find(ac->spr.lotag);
|
||||
if (j == lotags.Size())
|
||||
{
|
||||
lotags[lotaglist] = ac->spr.lotag;
|
||||
lotaglist++;
|
||||
if (lotaglist > 64)
|
||||
I_Error("Too many switches (64 max).");
|
||||
|
||||
lotags.Push(ac->spr.lotag);
|
||||
DukeStatIterator it1(STAT_EFFECTOR);
|
||||
while (auto actj = it1.Next())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue