mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Implement SetLineBlocking
This could be done with Get/SetLineProperty just fine, but added just for completion's sake -- the Hexen instruction set is now fully implemented, minus SoundSequence which is for a feature we straight up don't have.
This commit is contained in:
parent
a2ddd5079e
commit
287c711da4
3 changed files with 33 additions and 1 deletions
|
|
@ -1147,6 +1147,37 @@ bool CallFunc_SetLineTexture(ACSVM::Thread *thread, const ACSVM::Word *argV, ACS
|
|||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
bool CallFunc_SetLineBlocking(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
|
||||
|
||||
Changes a linedef's blocking flag.
|
||||
--------------------------------------------------*/
|
||||
bool CallFunc_SetLineBlocking(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
|
||||
{
|
||||
mtag_t tag = 0;
|
||||
UINT32 blocking = 0;
|
||||
INT32 lineId = -1;
|
||||
|
||||
tag = argV[0];
|
||||
|
||||
if (argV[1] != 0)
|
||||
{
|
||||
blocking = ML_IMPASSABLE;
|
||||
}
|
||||
|
||||
TAG_ITER_LINES(tag, lineId)
|
||||
{
|
||||
line_t *line = &lines[lineId];
|
||||
|
||||
if (line->flags & ML_TWOSIDED) // disallow changing this for 1-sided lines
|
||||
{
|
||||
line->flags = (line->flags & ~ML_IMPASSABLE) | blocking;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
bool CallFunc_SetLineSpecial(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC)
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ bool CallFunc_IsNetworkGame(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSV
|
|||
bool CallFunc_SectorSound(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_AmbientSound(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetLineTexture(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetLineBlocking(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetLineSpecial(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_ThingSound(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_EndPrintBold(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ Environment::Environment()
|
|||
addCodeDataACS0( 95, {"", 2, addCallFunc(CallFunc_AmbientSound)});
|
||||
|
||||
addCodeDataACS0( 97, {"", 4, addCallFunc(CallFunc_SetLineTexture)});
|
||||
|
||||
addCodeDataACS0( 98, {"", 2, addCallFunc(CallFunc_SetLineBlocking)});
|
||||
addCodeDataACS0( 99, {"", 7, addCallFunc(CallFunc_SetLineSpecial)});
|
||||
addCodeDataACS0(100, {"", 3, addCallFunc(CallFunc_ThingSound)});
|
||||
addCodeDataACS0(101, {"", 0, addCallFunc(CallFunc_EndPrintBold)});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue