mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 09:11:01 +00:00
Changes:
Added Spawn Added GetActorX, GetActorY, GetActorZ Added GetActorVelX, GetActorVelY, GetActorVelZ Added GetActorAngle, GetActorPitch, GetActorRoll Added GetActorFloorZ, GetActorFloorTexture, GetActorLightLevel Added CheckActorState, CheckActorFlag, GetActorClass Added SetActorPosition, SetActorVelocity Added SetActorAngle, SetActorPitch, SetActorRoll Added SetActorState, SetActorFlag, SetActorClass Changed GetThingDye to GetActorDye Changed DyeThing to SetActorDye Added GiveRings, GiveSpheres, GiveLives, GiveScore, DropFlag, TossFlag, DropEmeralds, TossEmeralds Added PlayerHoldingFlag, PlayerIsIt, PlayerFinished Fixed SetActorProperty and GetActorProperty Removed AwardScore, AwardRings Removed actor properties: X, Y, Z, type, angle, pitch, roll, floorz, ceilingz, momx, momy, momz, state, flags, flags2, eflags Reorganized script types Made GAMEOVER scripts run when players die
This commit is contained in:
parent
74958f1d16
commit
6b4d193fdf
11 changed files with 1562 additions and 334 deletions
|
@ -31,62 +31,46 @@
|
|||
|
||||
// Actor properties you can get/set
|
||||
|
||||
#define APROP_X 0
|
||||
#define APROP_Y 1
|
||||
#define APROP_Z 2
|
||||
#define APROP_Type 3
|
||||
#define APROP_Angle 4
|
||||
#define APROP_Pitch 5
|
||||
#define APROP_Roll 6
|
||||
#define APROP_SpriteRoll 7
|
||||
#define APROP_Frame 8
|
||||
#define APROP_Sprite 9
|
||||
#define APROP_Sprite2 10
|
||||
#define APROP_RenderFlags 11
|
||||
#define APROP_SpriteXScale 12
|
||||
#define APROP_SpriteYScale 13
|
||||
#define APROP_SpriteXOffset 14
|
||||
#define APROP_SpriteYOffset 15
|
||||
#define APROP_FloorZ 16
|
||||
#define APROP_CeilingZ 17
|
||||
#define APROP_Radius 18
|
||||
#define APROP_Height 19
|
||||
#define APROP_MomX 20
|
||||
#define APROP_MomY 21
|
||||
#define APROP_MomZ 22
|
||||
#define APROP_Tics 23
|
||||
#define APROP_State 24
|
||||
#define APROP_Flags 25
|
||||
#define APROP_Flags2 26
|
||||
#define APROP_ExtraFlags 27
|
||||
#define APROP_Skin 28
|
||||
#define APROP_Color 29
|
||||
#define APROP_Health 30
|
||||
#define APROP_MoveDir 31
|
||||
#define APROP_MoveCount 32
|
||||
#define APROP_ReactionTime 33
|
||||
#define APROP_Threshold 34
|
||||
#define APROP_LastLook 35
|
||||
#define APROP_Friction 36
|
||||
#define APROP_MoveFactor 37
|
||||
#define APROP_Fuse 38
|
||||
#define APROP_WaterTop 39
|
||||
#define APROP_WaterBottom 40
|
||||
#define APROP_Scale 41
|
||||
#define APROP_DestScale 42
|
||||
#define APROP_ScaleSpeed 43
|
||||
#define APROP_ExtraValue1 44
|
||||
#define APROP_ExtraValue2 45
|
||||
#define APROP_CustomVal 46
|
||||
#define APROP_CustomValMem 47
|
||||
#define APROP_Colorized 48
|
||||
#define APROP_Mirrored 49
|
||||
#define APROP_ShadowScale 50
|
||||
#define APROP_DispOffset 51
|
||||
#define APROP_Target 52
|
||||
#define APROP_Tracer 53
|
||||
#define APROP_HNext 54
|
||||
#define APROP_HPrev 55
|
||||
#define APROP_Frame 0
|
||||
#define APROP_Sprite 1
|
||||
#define APROP_Sprite2 2
|
||||
#define APROP_RenderFlags 3
|
||||
#define APROP_SpriteXScale 4
|
||||
#define APROP_SpriteYScale 5
|
||||
#define APROP_SpriteXOffset 6
|
||||
#define APROP_SpriteYOffset 7
|
||||
#define APROP_SpriteRoll 8
|
||||
#define APROP_Radius 9
|
||||
#define APROP_Height 10
|
||||
#define APROP_Tics 11
|
||||
#define APROP_Skin 12
|
||||
#define APROP_Color 13
|
||||
#define APROP_Health 14
|
||||
#define APROP_MoveDir 15
|
||||
#define APROP_MoveCount 16
|
||||
#define APROP_ReactionTime 17
|
||||
#define APROP_Threshold 18
|
||||
#define APROP_LastLook 19
|
||||
#define APROP_Friction 20
|
||||
#define APROP_MoveFactor 21
|
||||
#define APROP_Fuse 22
|
||||
#define APROP_WaterTop 23
|
||||
#define APROP_WaterBottom 24
|
||||
#define APROP_Scale 25
|
||||
#define APROP_DestScale 26
|
||||
#define APROP_ScaleSpeed 27
|
||||
#define APROP_ExtraValue1 28
|
||||
#define APROP_ExtraValue2 29
|
||||
#define APROP_CustomVal 30
|
||||
#define APROP_CustomValMem 31
|
||||
#define APROP_Colorized 32
|
||||
#define APROP_Mirrored 33
|
||||
#define APROP_ShadowScale 34
|
||||
#define APROP_DispOffset 35
|
||||
#define APROP_Target 36
|
||||
#define APROP_Tracer 37
|
||||
#define APROP_HNext 38
|
||||
#define APROP_HPrev 39
|
||||
|
||||
// Line properties
|
||||
|
||||
|
@ -237,6 +221,11 @@
|
|||
#define TEAM_RED 1
|
||||
#define TEAM_BLUE 2
|
||||
|
||||
// Team flags
|
||||
|
||||
#define TEAMFLAG_RED (1 << 0)
|
||||
#define TEAMFLAG_BLUE (1 << 1)
|
||||
|
||||
// Weapons
|
||||
|
||||
#define WEAPON_AUTO 0
|
||||
|
|
|
@ -7,13 +7,25 @@ special
|
|||
-5:SetSectorProperty(3),
|
||||
-7:GetSideProperty(2),
|
||||
-8:SetSideProperty(3),
|
||||
-10:GetThingProperty(2),
|
||||
-11:SetThingProperty(3),
|
||||
-100:strcmp(2,3),
|
||||
-101:strcasecmp(2,3),
|
||||
-120:PlayerRings(0),
|
||||
-122:PlayerScore(0),
|
||||
-123:PlayerSuper(0),
|
||||
-200:GetActorVelX(1),
|
||||
-201:GetActorVelY(1),
|
||||
-202:GetActorVelZ(1),
|
||||
-203:GetActorRoll(1),
|
||||
-204:GetActorFloorTexture(1),
|
||||
-205:CheckActorState(2),
|
||||
-206:CheckActorFlag(2),
|
||||
-207:GetActorClass(1),
|
||||
-208:GetActorDye(1),
|
||||
-209:SetActorVelocity(4,5),
|
||||
-210:SetActorRoll(2),
|
||||
-211:SetActorFlag(2,3),
|
||||
-212:SetActorClass(2),
|
||||
-213:SetActorDye(2),
|
||||
-300:CountEnemies(2),
|
||||
-301:CountPushables(2),
|
||||
-302:HasUnlockable(1),
|
||||
|
@ -30,11 +42,8 @@ special
|
|||
-313:NiGHTSAttack(0),
|
||||
-314:ModeAttacking(0),
|
||||
-315:LowestLap(0),
|
||||
-320:GetThingDye(0),
|
||||
-321:DyeThing(1),
|
||||
-322:Teleport(2,3),
|
||||
-323:SetViewpoint(1,2),
|
||||
// -324:Thing_Spawn(1), // NOTE: would it be better to implement Spawn? (https://zdoom.org/wiki/Spawn)
|
||||
-325:Thing_TrackAngle(4,6),
|
||||
-326:Thing_StopTrackingAngle(1),
|
||||
-327:CheckPowerUp(1),
|
||||
|
@ -44,6 +53,17 @@ special
|
|||
-331:TakeAmmo(2),
|
||||
-332:DoSuperTransformation(0,1),
|
||||
-333:DoSuperDetransformation(0),
|
||||
-334:GiveRings(1),
|
||||
-335:GiveSpheres(1),
|
||||
-336:GiveLives(1),
|
||||
-337:GiveScore(1),
|
||||
-338:DropFlag(0),
|
||||
-339:TossFlag(0),
|
||||
-340:DropEmeralds(0),
|
||||
-341:TossEmeralds(0),
|
||||
-342:PlayerHoldingFlag(2),
|
||||
-343:PlayerIsIt(1),
|
||||
-344:PlayerFinished(1),
|
||||
-500:CameraWait(1),
|
||||
-503:SetLineRenderStyle(3),
|
||||
-504:MapWarp(2),
|
||||
|
@ -84,7 +104,6 @@ special
|
|||
420:Light_Fade(3,6),
|
||||
421:StopLightingEffect(1),
|
||||
424:Weather_Change(1,2),
|
||||
427:AwardScore(1),
|
||||
428:Plat_StartMovement(1,2),
|
||||
429:Sector_Crush(1,2),
|
||||
432:Switch2DMode(0,1),
|
||||
|
@ -109,7 +128,6 @@ special
|
|||
454:FOF_StopFading(2),
|
||||
455:Colormap_Fade(3,4),
|
||||
456:Colormap_StopFading(1),
|
||||
460:AwardRings(1,2),
|
||||
462:StopTimer(0),
|
||||
464:TriggerEggCapsule(1,2),
|
||||
466:SetLevelFailureState(1),
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -78,10 +78,9 @@ bool CallFunc_SkinUnlocked(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM
|
|||
bool CallFunc_PlayerSkin(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_PlayerBot(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_PlayerExiting(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectDye(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectDye(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_Teleport(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetViewpoint(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SpawnObject(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_TrackObjectAngle(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_StopTrackingObjectAngle(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_PlayerEmeralds(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
@ -96,6 +95,36 @@ bool CallFunc_NiGHTSAttack(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM
|
|||
|
||||
bool CallFunc_SetLineRenderStyle(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
||||
// Some useful actor functions.
|
||||
bool CallFunc_GetObjectX(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectY(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectZ(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectVelX(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectVelY(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectVelZ(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectAngle(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectRoll(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectPitch(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectFloorZ(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectCeilingZ(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectFloorTexture(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectLightLevel(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_CheckObjectState(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_CheckObjectFlag(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectClass(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GetObjectDye(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
||||
bool CallFunc_SetObjectPosition(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectVelocity(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectAngle(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectRoll(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectPitch(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectState(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectFlag(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectClass(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectDye(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_SetObjectSpecial(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
||||
bool CallFunc_MapWarp(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_AddBot(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_RemoveBot(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
@ -124,6 +153,18 @@ bool CallFunc_TakeAmmo(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Wo
|
|||
bool CallFunc_DoSuperTransformation(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_DoSuperDetransformation(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
||||
bool CallFunc_GiveRings(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GiveSpheres(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GiveLives(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_GiveScore(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_DropFlag(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_TossFlag(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_DropEmeralds(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_TossEmeralds(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_PlayerHoldingFlag(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_PlayerIsIt(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_PlayerFinished(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
||||
bool CallFunc_Sin(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_Cos(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
bool CallFunc_Tan(ACSVM::Thread *thread, const ACSVM::Word *argV, ACSVM::Word argC);
|
||||
|
|
|
@ -98,6 +98,7 @@ Environment::Environment()
|
|||
addCodeDataACS0(119, {"", 0, addCallFunc(CallFunc_PlayerTeam)});
|
||||
|
||||
// 136 to 137: Implemented by ACSVM
|
||||
addCodeDataACS0(149, {"", 6, addCallFunc(CallFunc_SpawnObject)});
|
||||
|
||||
// 157: Implemented by ACSVM
|
||||
|
||||
|
@ -105,29 +106,43 @@ Environment::Environment()
|
|||
addCodeDataACS0(174, {"BB", 0, addCallFunc(CallFunc_Random)});
|
||||
// 175 to 179: Implemented by ACSVM
|
||||
|
||||
addCodeDataACS0(180, {"", 7, addCallFunc(CallFunc_SetObjectSpecial)});
|
||||
|
||||
// 181 to 189: Implemented by ACSVM
|
||||
addCodeDataACS0(196, {"", 1, addCallFunc(CallFunc_GetObjectX)});
|
||||
addCodeDataACS0(197, {"", 1, addCallFunc(CallFunc_GetObjectY)});
|
||||
addCodeDataACS0(198, {"", 1, addCallFunc(CallFunc_GetObjectZ)});
|
||||
|
||||
// 203 to 217: Implemented by ACSVM
|
||||
addCodeDataACS0(220, {"", 2, addCallFunc(CallFunc_Sin)});
|
||||
addCodeDataACS0(221, {"", 2, addCallFunc(CallFunc_Cos)});
|
||||
|
||||
// 225 to 243: Implemented by ACSVM
|
||||
|
||||
addCodeDataACS0(245, {"", 3, addCallFunc(CallFunc_SetThingProperty)});
|
||||
addCodeDataACS0(246, {"", 2, addCallFunc(CallFunc_GetThingProperty)});
|
||||
addCodeDataACS0(247, {"", 0, addCallFunc(CallFunc_PlayerNumber)});
|
||||
addCodeDataACS0(248, {"", 0, addCallFunc(CallFunc_ActivatorTID)});
|
||||
|
||||
// 253: Implemented by ACSVM
|
||||
|
||||
// 256 to 257: Implemented by ACSVM
|
||||
addCodeDataACS0(259, {"", 1, addCallFunc(CallFunc_GetObjectFloorZ)});
|
||||
|
||||
// 263: Implemented by ACSVM
|
||||
addCodeDataACS0(260, {"", 1, addCallFunc(CallFunc_GetObjectAngle)});
|
||||
addCodeDataACS0(266, {"", 2, addCallFunc(CallFunc_ChangeSky)}); // reimplements linedef type 423
|
||||
addCodeDataACS0(270, {"", 0, addCallFunc(CallFunc_EndLog)});
|
||||
// 273 to 275: Implemented by ACSVM
|
||||
addCodeDataACS0(276, {"", 2, addCallFunc(CallFunc_SetObjectAngle)});
|
||||
addCodeDataACS0(282, {"", 1, addCallFunc(CallFunc_GetObjectCeilingZ)});
|
||||
|
||||
// 291 to 325: Implemented by ACSVM
|
||||
|
||||
// 330: Implemented by ACSVM
|
||||
addCodeDataACS0(331, {"", 1, addCallFunc(CallFunc_GetObjectPitch)});
|
||||
addCodeDataACS0(332, {"", 1, addCallFunc(CallFunc_SetObjectPitch)});
|
||||
addCodeDataACS0(334, {"", 1, addCallFunc(CallFunc_SetObjectState)});
|
||||
addCodeDataACS0(340, {"", 1, addCallFunc(CallFunc_GetObjectLightLevel)});
|
||||
|
||||
// 349 to 361: Implemented by ACSVM
|
||||
|
||||
|
@ -146,8 +161,6 @@ Environment::Environment()
|
|||
addFuncDataACS0( 7, addCallFunc(CallFunc_GetSideProperty));
|
||||
addFuncDataACS0( 8, addCallFunc(CallFunc_SetSideProperty));
|
||||
// addFuncDataACS0( 9, addCallFunc(CallFunc_GetSideUserProperty));
|
||||
addFuncDataACS0( 10, addCallFunc(CallFunc_GetThingProperty));
|
||||
addFuncDataACS0( 11, addCallFunc(CallFunc_SetThingProperty));
|
||||
// addFuncDataACS0( 12, addCallFunc(CallFunc_GetThingUserProperty));
|
||||
// addFuncDataACS0( 13, addCallFunc(CallFunc_GetPlayerProperty));
|
||||
// addFuncDataACS0( 14, addCallFunc(CallFunc_SetPlayerProperty));
|
||||
|
@ -161,6 +174,22 @@ Environment::Environment()
|
|||
addFuncDataACS0( 122, addCallFunc(CallFunc_PlayerScore));
|
||||
addFuncDataACS0( 123, addCallFunc(CallFunc_PlayerSuper));
|
||||
|
||||
addFuncDataACS0( 200, addCallFunc(CallFunc_GetObjectVelX));
|
||||
addFuncDataACS0( 201, addCallFunc(CallFunc_GetObjectVelY));
|
||||
addFuncDataACS0( 202, addCallFunc(CallFunc_GetObjectVelZ));
|
||||
addFuncDataACS0( 203, addCallFunc(CallFunc_GetObjectRoll));
|
||||
addFuncDataACS0( 204, addCallFunc(CallFunc_GetObjectFloorTexture));
|
||||
addFuncDataACS0( 205, addCallFunc(CallFunc_CheckObjectState));
|
||||
addFuncDataACS0( 206, addCallFunc(CallFunc_CheckObjectFlag));
|
||||
addFuncDataACS0( 207, addCallFunc(CallFunc_GetObjectClass));
|
||||
addFuncDataACS0( 208, addCallFunc(CallFunc_GetObjectDye));
|
||||
|
||||
addFuncDataACS0( 209, addCallFunc(CallFunc_SetObjectVelocity));
|
||||
addFuncDataACS0( 210, addCallFunc(CallFunc_SetObjectRoll));
|
||||
addFuncDataACS0( 211, addCallFunc(CallFunc_SetObjectFlag));
|
||||
addFuncDataACS0( 212, addCallFunc(CallFunc_SetObjectClass));
|
||||
addFuncDataACS0( 213, addCallFunc(CallFunc_SetObjectDye));
|
||||
|
||||
addFuncDataACS0( 300, addCallFunc(CallFunc_CountEnemies));
|
||||
addFuncDataACS0( 301, addCallFunc(CallFunc_CountPushables));
|
||||
addFuncDataACS0( 302, addCallFunc(CallFunc_HasUnlockable));
|
||||
|
@ -177,11 +206,8 @@ Environment::Environment()
|
|||
addFuncDataACS0( 313, addCallFunc(CallFunc_NiGHTSAttack));
|
||||
addFuncDataACS0( 314, addCallFunc(CallFunc_ModeAttacking));
|
||||
addFuncDataACS0( 315, addCallFunc(CallFunc_LowestLap));
|
||||
addFuncDataACS0( 320, addCallFunc(CallFunc_GetObjectDye));
|
||||
addFuncDataACS0( 321, addCallFunc(CallFunc_SetObjectDye));
|
||||
addFuncDataACS0( 322, addCallFunc(CallFunc_Teleport));
|
||||
addFuncDataACS0( 323, addCallFunc(CallFunc_SetViewpoint));
|
||||
// addFuncDataACS0( 324, addCallFunc(CallFunc_SpawnObject));
|
||||
addFuncDataACS0( 325, addCallFunc(CallFunc_TrackObjectAngle));
|
||||
addFuncDataACS0( 326, addCallFunc(CallFunc_StopTrackingObjectAngle));
|
||||
addFuncDataACS0( 327, addCallFunc(CallFunc_CheckPowerUp));
|
||||
|
@ -191,6 +217,17 @@ Environment::Environment()
|
|||
addFuncDataACS0( 331, addCallFunc(CallFunc_TakeAmmo));
|
||||
addFuncDataACS0( 332, addCallFunc(CallFunc_DoSuperTransformation));
|
||||
addFuncDataACS0( 333, addCallFunc(CallFunc_DoSuperDetransformation));
|
||||
addFuncDataACS0( 334, addCallFunc(CallFunc_GiveRings));
|
||||
addFuncDataACS0( 335, addCallFunc(CallFunc_GiveSpheres));
|
||||
addFuncDataACS0( 336, addCallFunc(CallFunc_GiveLives));
|
||||
addFuncDataACS0( 337, addCallFunc(CallFunc_GiveScore));
|
||||
addFuncDataACS0( 338, addCallFunc(CallFunc_DropFlag));
|
||||
addFuncDataACS0( 339, addCallFunc(CallFunc_TossFlag));
|
||||
addFuncDataACS0( 340, addCallFunc(CallFunc_DropEmeralds));
|
||||
addFuncDataACS0( 341, addCallFunc(CallFunc_TossEmeralds));
|
||||
addFuncDataACS0( 342, addCallFunc(CallFunc_PlayerHoldingFlag));
|
||||
addFuncDataACS0( 343, addCallFunc(CallFunc_PlayerIsIt));
|
||||
addFuncDataACS0( 344, addCallFunc(CallFunc_PlayerFinished));
|
||||
|
||||
addFuncDataACS0( 500, addCallFunc(CallFunc_CameraWait));
|
||||
addFuncDataACS0( 503, addCallFunc(CallFunc_SetLineRenderStyle));
|
||||
|
|
|
@ -35,12 +35,16 @@ namespace srb2::acs {
|
|||
//
|
||||
enum acs_scriptType_e
|
||||
{
|
||||
ACS_ST_OPEN = 1, // OPEN: Runs once when the level starts.
|
||||
ACS_ST_RESPAWN = 2, // RESPAWN: Runs when a player respawns.
|
||||
ACS_ST_DEATH = 3, // DEATH: Runs when a player dies.
|
||||
ACS_ST_ENTER = 4, // ENTER: Runs when a player enters the game; both on start of the level, and when un-spectating.
|
||||
ACS_ST_GAMEOVER = 5, // GAMEOVER: Runs when the level ends due to a losing condition and no player has an extra life.
|
||||
ACS_ST_FINISH = 6, // FINISH: Runs when a player finishes
|
||||
ACS_ST_OPEN = 1, // OPEN: Runs once when the level starts.
|
||||
ACS_ST_RESPAWN = 2, // RESPAWN: Runs when a player respawns.
|
||||
ACS_ST_DEATH = 3, // DEATH: Runs when a player dies.
|
||||
ACS_ST_ENTER = 4, // ENTER: Runs when a player enters the game; both on start of the level, and when un-spectating.
|
||||
ACS_ST_PICKUP = 5, // PICKUP: Runs when a player picks up a flag. (Skulltag)
|
||||
ACS_ST_BLUERETURN = 6, // BLUERETURN: Runs when the blue flag returns to its base. (Skulltag)
|
||||
ACS_ST_REDRETURN = 7, // REDRETURN: Runs when the red flag returns to its base. (Skulltag)
|
||||
ACS_ST_EVENT = 16, // EVENT: Runs when certain game events happen. (Zandronum)
|
||||
ACS_ST_GAMEOVER = 19, // GAMEOVER: Runs when the player gets a game over. (SRB2)
|
||||
ACS_ST_FINISH = 20 // FINISH: Runs when a player finishes the level. (SRB2)
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -50,7 +54,7 @@ enum acs_tagType_e
|
|||
{
|
||||
ACS_TAGTYPE_POLYOBJ,
|
||||
ACS_TAGTYPE_SECTOR,
|
||||
ACS_TAGTYPE_CAMERA,
|
||||
ACS_TAGTYPE_CAMERA
|
||||
};
|
||||
|
||||
class ThreadInfo : public ACSVM::ThreadInfo
|
||||
|
|
|
@ -4290,8 +4290,6 @@ static void G_DoStartContinue(void)
|
|||
|
||||
G_PlayerFinishLevel(consoleplayer); // take away cards and stuff
|
||||
|
||||
ACS_RunGameOverScript();
|
||||
|
||||
F_StartContinue();
|
||||
gameaction = ga_nothing;
|
||||
}
|
||||
|
|
|
@ -2728,6 +2728,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
if (!usedCheats && cursaveslot > 0)
|
||||
G_SaveGameOver((UINT32)cursaveslot, (target->player->continues <= 0));
|
||||
}
|
||||
|
||||
ACS_RunGameOverScript();
|
||||
}
|
||||
}
|
||||
target->player->playerstate = PST_DEAD;
|
||||
|
|
|
@ -314,7 +314,6 @@ boolean P_CheckSkyHit(mobj_t *mo, line_t *line);
|
|||
void P_PushableThinker(mobj_t *mobj);
|
||||
void P_SceneryThinker(mobj_t *mobj);
|
||||
|
||||
|
||||
fixed_t P_MobjFloorZ(sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, fixed_t radius, line_t *line, boolean lowest, boolean perfect);
|
||||
fixed_t P_MobjCeilingZ(sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, fixed_t radius, line_t *line, boolean lowest, boolean perfect);
|
||||
#define P_GetFloorZ(mobj, sector, x, y, line) P_MobjFloorZ(sector, NULL, x, y, mobj->radius, line, false, false)
|
||||
|
@ -324,6 +323,8 @@ fixed_t P_MobjCeilingZ(sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t
|
|||
#define P_GetSpecialBottomZ(mobj, src, bound) P_MobjFloorZ(src, bound, mobj->x, mobj->y, mobj->radius, NULL, src != bound, true)
|
||||
#define P_GetSpecialTopZ(mobj, src, bound) P_MobjCeilingZ(src, bound, mobj->x, mobj->y, mobj->radius, NULL, src == bound, true)
|
||||
|
||||
INT32 P_FloorPicAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height);
|
||||
|
||||
#define P_CameraGetFloorZ(mobj, sector, x, y, line) P_MobjFloorZ(sector, NULL, x, y, mobj->radius, line, false, false)
|
||||
#define P_CameraGetCeilingZ(mobj, sector, x, y, line) P_MobjCeilingZ(sector, NULL, x, y, mobj->radius, line, true, false)
|
||||
#define P_CameraGetFOFTopZ(mobj, sector, fof, x, y, line) P_MobjCeilingZ(sectors + fof->secnum, sector, x, y, mobj->radius, line, false, false)
|
||||
|
|
34
src/p_mobj.c
34
src/p_mobj.c
|
@ -1260,6 +1260,40 @@ fixed_t P_MobjCeilingZ(sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t
|
|||
return sector->ceilingheight;
|
||||
}
|
||||
|
||||
INT32 P_FloorPicAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height)
|
||||
{
|
||||
sector_t *sector = R_PointInSubsector(x, y)->sector;
|
||||
|
||||
INT32 floorpic = sector->floorpic;
|
||||
|
||||
if (sector->ffloors)
|
||||
{
|
||||
ffloor_t *best = NULL;
|
||||
fixed_t thingtop = z + height;
|
||||
|
||||
for (ffloor_t *rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->fofflags & FOF_EXISTS))
|
||||
continue;
|
||||
|
||||
fixed_t topheight = P_GetFFloorTopZAt(rover, x, y);
|
||||
fixed_t bottomheight = P_GetFFloorBottomZAt(rover, x, y);
|
||||
|
||||
fixed_t delta1 = z - (bottomheight + ((topheight - bottomheight)/2));
|
||||
fixed_t delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2));
|
||||
if (topheight > P_GetFFloorTopZAt(best, x, y) && abs(delta1) < abs(delta2))
|
||||
{
|
||||
best = rover;
|
||||
}
|
||||
}
|
||||
|
||||
if (best)
|
||||
floorpic = *best->toppic;
|
||||
}
|
||||
|
||||
return floorpic;
|
||||
}
|
||||
|
||||
static void P_PlayerFlip(mobj_t *mo)
|
||||
{
|
||||
if (!mo->player)
|
||||
|
|
|
@ -2315,6 +2315,7 @@ void P_DoPlayerFinish(player_t *player)
|
|||
player->powers[pw_underwater] = 0;
|
||||
player->powers[pw_spacetime] = 0;
|
||||
P_RestoreMusic(player);
|
||||
ACS_RunPlayerFinishScript(player);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue