Merge branch 'master' into scripting
Conflicts: src/actor.h src/g_hexen/a_clericstaff.cpp src/p_enemy.cpp src/p_interaction.cpp src/p_local.h src/p_mobj.cpp src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
commit
bf747075e8
179 changed files with 10280 additions and 4787 deletions
|
|
@ -148,7 +148,7 @@ FUNC(LS_Polyobj_MoveToSpot)
|
|||
FActorIterator iterator (arg2);
|
||||
AActor *spot = iterator.Next();
|
||||
if (spot == NULL) return false;
|
||||
return EV_MovePolyTo (ln, arg0, SPEED(arg1), spot->x, spot->y, false);
|
||||
return EV_MovePolyTo (ln, arg0, SPEED(arg1), spot->X(), spot->Y(), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Polyobj_DoorSwing)
|
||||
|
|
@ -199,7 +199,7 @@ FUNC(LS_Polyobj_OR_MoveToSpot)
|
|||
FActorIterator iterator (arg2);
|
||||
AActor *spot = iterator.Next();
|
||||
if (spot == NULL) return false;
|
||||
return EV_MovePolyTo (ln, arg0, SPEED(arg1), spot->x, spot->y, true);
|
||||
return EV_MovePolyTo (ln, arg0, SPEED(arg1), spot->X(), spot->Y(), true);
|
||||
}
|
||||
|
||||
FUNC(LS_Polyobj_Stop)
|
||||
|
|
@ -1945,6 +1945,9 @@ FUNC(LS_Sector_ChangeFlags)
|
|||
|
||||
rtn = false;
|
||||
FSectorTagIterator itr(arg0);
|
||||
// exclude protected flags
|
||||
arg1 &= ~SECF_NOMODIFY;
|
||||
arg2 &= ~SECF_NOMODIFY;
|
||||
while ((secNum = itr.Next()) >= 0)
|
||||
{
|
||||
sectors[secNum].Flags = (sectors[secNum].Flags | arg1) & ~arg2;
|
||||
|
|
@ -2246,7 +2249,7 @@ FUNC(LS_PointPush_SetForce)
|
|||
}
|
||||
|
||||
FUNC(LS_Sector_SetDamage)
|
||||
// Sector_SetDamage (tag, amount, mod)
|
||||
// Sector_SetDamage (tag, amount, mod, interval, leaky)
|
||||
{
|
||||
// The sector still stores the mod in its old format because
|
||||
// adding an FName to the sector_t structure might cause
|
||||
|
|
@ -2257,8 +2260,28 @@ FUNC(LS_Sector_SetDamage)
|
|||
int secnum;
|
||||
while ((secnum = itr.Next()) >= 0)
|
||||
{
|
||||
sectors[secnum].damage = arg1;
|
||||
sectors[secnum].mod = arg2;
|
||||
if (arg3 <= 0) // emulate old and hacky method to handle leakiness.
|
||||
{
|
||||
if (arg1 < 20)
|
||||
{
|
||||
arg4 = 0;
|
||||
arg3 = 32;
|
||||
}
|
||||
else if (arg1 < 50)
|
||||
{
|
||||
arg4 = 5;
|
||||
arg3 = 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
arg4 = 256;
|
||||
arg3 = 1;
|
||||
}
|
||||
}
|
||||
sectors[secnum].damageamount = (short)arg1;
|
||||
sectors[secnum].damagetype = MODtoDamageType(arg2);
|
||||
sectors[secnum].damageinterval = (short)arg3;
|
||||
sectors[secnum].leakydamage = (short)arg4;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue