Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Get pVel Functions
- //Get, Set, and Clear pVel and PushVel Functions based off parts of "GFD_PlatformFriction" script by GFD
- function int GetLastPVelX(int aTID)
- {
- int pVelPrev;
- if(aTID == 0){
- pVelPrev = CheckInventory("GFD_pVelxPrev");
- if(CheckInventory("GFD_pVelxPrevNegative")){
- pVelPrev = -pVelPrev;}}
- else{
- pVelPrev = CheckActorInventory(aTID,"GFD_pVelxPrev");
- if(CheckActorInventory(aTID,"GFD_pVelxPrevNegative")){
- pVelPrev = -pVelPrev;}}
- return pVelPrev;
- }
- function int GetLastPVelY(int aTID)
- {
- int pVelPrev;
- if(aTID == 0){
- pVelPrev = CheckInventory("GFD_pVelyPrev");
- if(CheckInventory("GFD_pVelyPrevNegative")){
- pVelPrev = -pVelPrev;}}
- else{
- pVelPrev = CheckActorInventory(aTID,"GFD_pVelyPrev");
- if(CheckActorInventory(aTID,"GFD_pVelyPrevNegative")){
- pVelPrev = -pVelPrev;}}
- return pVelPrev;
- }
- function int GetLastPVelZ(int aTID)
- {
- int pVelPrev;
- if(aTID == 0){
- pVelPrev = CheckInventory("GFD_pVelzPrev");
- if(CheckInventory("GFD_pVelzPrevNegative")){
- pVelPrev = -pVelPrev;}}
- else{
- pVelPrev = CheckActorInventory(aTID,"GFD_pVelzPrev");
- if(CheckActorInventory(aTID,"GFD_pVelzPrevNegative")){
- pVelPrev = -pVelPrev;}}
- return pVelPrev;
- }
- //Set pVel Functions
- function void SetLastPVelX(int aTID, int pVel)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelxPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelxPrev", MAX_SIGNED_LONG);
- GiveInventory("GFD_pVelxPrev", abs(pVel));
- if(pVel < 0){GiveInventory("GFD_pVelxPrevNegative", 1);}}
- else {
- TakeActorInventory(aTID,"GFD_pVelxPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelxPrev", MAX_SIGNED_LONG);
- GiveActorInventory(aTID,"GFD_pVelxPrev", abs(pVel));
- if(pVel < 0){GiveActorInventory(aTID,"GFD_pVelxPrevNegative", 1);}}
- }
- function void SetLastPVelY(int aTID, int pVel)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelyPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelyPrev", MAX_SIGNED_LONG);
- GiveInventory("GFD_pVelyPrev", abs(pVel));
- if(pVel < 0){GiveInventory("GFD_pVelyPrevNegative", 1);}}
- else {
- TakeActorInventory(aTID,"GFD_pVelyPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelyPrev", MAX_SIGNED_LONG);
- GiveActorInventory(aTID,"GFD_pVelyPrev", abs(pVel));
- if(pVel < 0){GiveActorInventory(aTID,"GFD_pVelyPrevNegative", 1);}}
- }
- function void SetLastPVelZ(int aTID, int pVel)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelzPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelzPrev", MAX_SIGNED_LONG);
- GiveInventory("GFD_pVelzPrev", abs(pVel));
- if(pVel < 0){GiveInventory("GFD_pVelzPrevNegative", 1);}}
- else {
- TakeActorInventory(aTID,"GFD_pVelzPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelzPrev", MAX_SIGNED_LONG);
- GiveActorInventory(aTID,"GFD_pVelzPrev", abs(pVel));
- if(pVel < 0){GiveActorInventory(aTID,"GFD_pVelzPrevNegative", 1);}}
- }
- //Clear pVel Functions
- function void ClearLastPVelX(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelxPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelxPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_pVelxPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelxPrev", MAX_SIGNED_LONG);}
- }
- function void ClearLastPVelY(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelyPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelyPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_pVelyPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelyPrev", MAX_SIGNED_LONG);}
- }
- function void ClearLastPVelZ(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelzPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelzPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_pVelzPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelzPrev", MAX_SIGNED_LONG);}
- }
- function void ClearLastPVels(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_pVelxPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelxPrev", MAX_SIGNED_LONG);
- TakeInventory("GFD_pVelyPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelyPrev", MAX_SIGNED_LONG);
- TakeInventory("GFD_pVelzPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_pVelzPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_pVelxPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelxPrev", MAX_SIGNED_LONG);
- TakeActorInventory(aTID,"GFD_pVelyPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelyPrev", MAX_SIGNED_LONG);
- TakeActorInventory(aTID,"GFD_pVelzPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_pVelzPrev", MAX_SIGNED_LONG);}
- }
- //Get PushVel Functions
- function int GetLastPushVelX(int aTID)
- {
- int PushVelPrev;
- if(aTID == 0){
- PushVelPrev = CheckInventory("GFD_PushVelxPrev");
- if(CheckInventory("GFD_PushVelxPrevNegative")){
- PushVelPrev = -PushVelPrev;}}
- else{
- PushVelPrev = CheckActorInventory(aTID,"GFD_PushVelxPrev");
- if(CheckActorInventory(aTID,"GFD_PushVelxPrevNegative")){
- PushVelPrev = -PushVelPrev;}}
- return PushVelPrev;
- }
- function int GetLastPushVelY(int aTID)
- {
- int PushVelPrev;
- if(aTID == 0){
- PushVelPrev = CheckInventory("GFD_PushVelyPrev");
- if(CheckInventory("GFD_PushVelyPrevNegative")){
- PushVelPrev = -PushVelPrev;}}
- else{
- PushVelPrev = CheckActorInventory(aTID,"GFD_PushVelyPrev");
- if(CheckActorInventory(aTID,"GFD_PushVelyPrevNegative")){
- PushVelPrev = -PushVelPrev;}}
- return PushVelPrev;
- }
- function int GetLastPushVelZ(int aTID)
- {
- int PushVelPrev;
- if(aTID == 0){
- PushVelPrev = CheckInventory("GFD_PushVelzPrev");
- if(CheckInventory("GFD_PushVelzPrevNegative")){
- PushVelPrev = -PushVelPrev;}}
- else{
- PushVelPrev = CheckActorInventory(aTID,"GFD_PushVelzPrev");
- if(CheckActorInventory(aTID,"GFD_PushVelzPrevNegative")){
- PushVelPrev = -PushVelPrev;}}
- return PushVelPrev;
- }
- //Set PushVel Functions
- function void SetLastPushVelX(int aTID, int PushVel)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelxPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelxPrev", MAX_SIGNED_LONG);
- GiveInventory("GFD_PushVelxPrev", abs(PushVel));
- if(PushVel < 0){GiveInventory("GFD_PushVelxPrevNegative", 1);}}
- else {
- TakeActorInventory(aTID,"GFD_PushVelxPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelxPrev", MAX_SIGNED_LONG);
- GiveActorInventory(aTID,"GFD_PushVelxPrev", abs(PushVel));
- if(PushVel < 0){GiveActorInventory(aTID,"GFD_PushVelxPrevNegative", 1);}}
- }
- function void SetLastPushVelY(int aTID, int PushVel)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelyPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelyPrev", MAX_SIGNED_LONG);
- GiveInventory("GFD_PushVelyPrev", abs(PushVel));
- if(PushVel < 0){GiveInventory("GFD_PushVelyPrevNegative", 1);}}
- else {
- TakeActorInventory(aTID,"GFD_PushVelyPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelyPrev", MAX_SIGNED_LONG);
- GiveActorInventory(aTID,"GFD_PushVelyPrev", abs(PushVel));
- if(PushVel < 0){GiveActorInventory(aTID,"GFD_PushVelyPrevNegative", 1);}}
- }
- function void SetLastPushVelZ(int aTID, int PushVel)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelzPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelzPrev", MAX_SIGNED_LONG);
- GiveInventory("GFD_PushVelzPrev", abs(PushVel));
- if(PushVel < 0){GiveInventory("GFD_PushVelzPrevNegative", 1);}}
- else {
- TakeActorInventory(aTID,"GFD_PushVelzPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelzPrev", MAX_SIGNED_LONG);
- GiveActorInventory(aTID,"GFD_PushVelzPrev", abs(PushVel));
- if(PushVel < 0){GiveActorInventory(aTID,"GFD_PushVelzPrevNegative", 1);}}
- }
- //Clear PushVel Functions
- function void ClearLastPushVelX(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelxPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelxPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_PushVelxPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelxPrev", MAX_SIGNED_LONG);}
- }
- function void ClearLastPushVelY(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelyPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelyPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_PushVelyPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelyPrev", MAX_SIGNED_LONG);}
- }
- function void ClearLastPushVelZ(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelzPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelzPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_PushVelzPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelzPrev", MAX_SIGNED_LONG);}
- }
- function void ClearLastPushVels(int aTID)
- {
- if(aTID == 0){
- TakeInventory("GFD_PushVelxPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelxPrev", MAX_SIGNED_LONG);
- TakeInventory("GFD_PushVelyPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelyPrev", MAX_SIGNED_LONG);
- TakeInventory("GFD_PushVelzPrevNegative", 0x7FFFFFFF);
- TakeInventory("GFD_PushVelzPrev", MAX_SIGNED_LONG);}
- else {
- TakeActorInventory(aTID,"GFD_PushVelxPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelxPrev", MAX_SIGNED_LONG);
- TakeActorInventory(aTID,"GFD_PushVelyPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelyPrev", MAX_SIGNED_LONG);
- TakeActorInventory(aTID,"GFD_PushVelzPrevNegative", 0x7FFFFFFF);
- TakeActorInventory(aTID,"GFD_PushVelzPrev", MAX_SIGNED_LONG);}
- }
- //Other Functions
- function int GetAirF(void)
- {
- int AirFriction = 1.0004 - FixedMul(0.941, GetCVar("sv_aircontrol"));
- return AirFriction;
- }
- function int GetAirFD(void)
- {
- int AirFriction = 1.0004 - FixedMul(0.941, GetCVar("sv_aircontrol"));
- AirFriction = FixedDiv(1.0, AirFriction);
- return AirFriction;
- }
- function int GetPreAirFVel(int pVel)
- {
- int AirFriction = 1.0004 - FixedMul(0.941, GetCVar("sv_aircontrol"));
- AirFriction = FixedDiv(1.0, AirFriction);
- pVel = FixedMul(pVel, AirFriction);
- return pVel;
- }
- function int FixedAngMod(int fAngle)
- {
- if (fAngle > 1.0){
- fAngle %= 65536; }
- else if (fAngle < 0){
- fAngle %= (-65536);
- fAngle = fAngle + 65536;}
- return fAngle;
- }
- function int LineIntCheck(int p0_x, int p0_y, int p1_x, int p1_y,
- int p2_x, int p2_y, int p3_x, int p3_y)
- {
- int s02_x, s02_y, s10_x, s10_y, s32_x, s32_y, s_numer, t_numer, denom, t;
- s10_x = p1_x - p0_x;
- s10_y = p1_y - p0_y;
- s32_x = p3_x - p2_x;
- s32_y = p3_y - p2_y;
- denom = FixedMul(s10_x, s32_y) - FixedMul(s32_x, s10_y);
- if ((denom == 0) &&
- ( ((p0_x > p2_x) && (p1_x > p2_x) && (p0_x > p3_x) && (p1_x > p3_x)) ||
- ((p0_x < p2_x) && (p1_x < p2_x) && (p0_x < p3_x) && (p1_x < p3_x)) )){
- return 0;} // Collinear, non intersecting
- else if (denom == 0){
- return 1;} // Collinear, intersecting
- bool denomPositive = denom > 0;
- s02_x = p0_x - p2_x;
- s02_y = p0_y - p2_y;
- s_numer = FixedMul(s10_x,s02_y) - FixedMul(s10_y,s02_x);
- if ((s_numer < 0) == denomPositive){
- return 0;} // No collision
- t_numer = FixedMul(s32_x,s02_y) - FixedMul(s32_y,s02_x);
- if ((t_numer < 0) == denomPositive){
- return 0;} // No collision
- if (((s_numer > denom) == denomPositive) || ((t_numer > denom) == denomPositive)){
- return 0;} // No collision
- // Collision detected
- //t = t_numer / denom;
- //int i_x = p0_x + FixedMul(t,s10_x);
- //int i_y = p0_y + FixedMul(t,s10_y);
- return 1;
- }
- function int LineIntGetX(int p0_x, int p0_y, int p1_x, int p1_y,
- int p2_x, int p2_y, int p3_x, int p3_y)
- {
- int s02_x, s02_y, s10_x, s10_y, s32_x, s32_y, s_numer, t_numer, denom, t;
- s10_x = p1_x - p0_x;
- s10_y = p1_y - p0_y;
- s32_x = p3_x - p2_x;
- s32_y = p3_y - p2_y;
- denom = FixedMul(s10_x, s32_y) - FixedMul(s32_x, s10_y);
- if ((denom == 0) &&
- ( ((p0_x > p2_x) && (p1_x > p2_x) && (p0_x > p3_x) && (p1_x > p3_x)) ||
- ((p0_x < p2_x) && (p1_x < p2_x) && (p0_x < p3_x) && (p1_x < p3_x)) )){
- return 0;} // Collinear, non intersecting
- else if (denom == 0){
- return 1;} // Collinear, intersecting
- bool denomPositive = denom > 0;
- s02_x = p0_x - p2_x;
- s02_y = p0_y - p2_y;
- s_numer = FixedMul(s10_x,s02_y) - FixedMul(s10_y,s02_x);
- if ((s_numer < 0) == denomPositive){
- return 0;} // No collision
- t_numer = FixedMul(s32_x,s02_y) - FixedMul(s32_y,s02_x);
- if ((t_numer < 0) == denomPositive){
- return 0;} // No collision
- if (((s_numer > denom) == denomPositive) || ((t_numer > denom) == denomPositive)){
- return 0;} // No collision
- // Collision detected
- t = t_numer / denom;
- int i_x = p0_x + FixedMul(t,s10_x);
- //int i_y = p0_y + FixedMul(t,s10_y);
- return i_x;
- }
- function int LineIntGetY(int p0_x, int p0_y, int p1_x, int p1_y,
- int p2_x, int p2_y, int p3_x, int p3_y)
- {
- int s02_x, s02_y, s10_x, s10_y, s32_x, s32_y, s_numer, t_numer, denom, t;
- s10_x = p1_x - p0_x;
- s10_y = p1_y - p0_y;
- s32_x = p3_x - p2_x;
- s32_y = p3_y - p2_y;
- denom = FixedMul(s10_x, s32_y) - FixedMul(s32_x, s10_y);
- if ((denom == 0) &&
- ( ((p0_x > p2_x) && (p1_x > p2_x) && (p0_x > p3_x) && (p1_x > p3_x)) ||
- ((p0_x < p2_x) && (p1_x < p2_x) && (p0_x < p3_x) && (p1_x < p3_x)) )){
- return 0;} // Collinear, non intersecting
- else if (denom == 0){
- return 1;} // Collinear, intersecting
- bool denomPositive = denom > 0;
- s02_x = p0_x - p2_x;
- s02_y = p0_y - p2_y;
- s_numer = FixedMul(s10_x,s02_y) - FixedMul(s10_y,s02_x);
- if ((s_numer < 0) == denomPositive){
- return 0;} // No collision
- t_numer = FixedMul(s32_x,s02_y) - FixedMul(s32_y,s02_x);
- if ((t_numer < 0) == denomPositive){
- return 0;} // No collision
- if (((s_numer > denom) == denomPositive) || ((t_numer > denom) == denomPositive)){
- return 0;} // No collision
- // Collision detected
- t = t_numer / denom;
- //int i_x = p0_x + FixedMul(t,s10_x);
- int i_y = p0_y + FixedMul(t,s10_y);
- return i_y;
- }
- //Remove this prolly
- function int FixedVectorLength (int FixedX, int FixedY)
- {
- int FixedLength = FixedMul(FixedX,FixedY);
- FixedLength = FixedSqrt(FixedLength);
- return FixedLength;
- }
- script 110 enter
- {
- Delay(1);
- TakeInventory("OnPlatform",1);
- TakeInventory("OnPlatformTimer",1);
- if(CheckInventory("OnPlatform") == 0){
- ClearLastPVels(0);}
- TakeInventory("OnPlatformTimer",0x7FFFFFFF);
- Restart;
- }
- script "PlatformTID" (int WhichPlatform)
- {
- int PlatformTID = ActivatorTID();
- if ((PlatformTID > 0) && (PlatformTID == PlatTIDArray[WhichPlatform])){ }
- else if (PlatformTID > 0){ PlatTIDArray[WhichPlatform] = PlatformTID; }
- else { PlatformTID = UniqueTID();
- PlatTIDArray[WhichPlatform] = PlatformTID;
- Thing_ChangeTID(0, PlatformTID);}
- SetActorState(0,"LoopState");
- }
- script "PlatMethod1" (int WhichPlat, int ZTolerance)
- {
- if (ZTolerance == 0){ ZTolerance = 4.0; }
- //Platform Info
- int PVelX = GetActorVelX(PlatTIDArray[WhichPlat]);
- int PVelY = GetActorVelY(PlatTIDArray[WhichPlat]);
- int PVelZ = GetActorVelZ(PlatTIDArray[WhichPlat]);
- int PlatHeight = GetActorProperty(PlatTIDArray[WhichPlat], APROP_Height);
- PlatHeight = PlatHeight << 16;
- int PlatRadius = GetActorProperty(PlatTIDArray[WhichPlat], APROP_Radius);
- PlatRadius = PlatRadius << 16;
- int PlatBigRadius = VectorLength(PlatRadius,PlatRadius);
- int PlatX = GetActorX(PlatTIDArray[WhichPlat]);
- int PlatY = GetActorY(PlatTIDArray[WhichPlat]);
- int PlatZ = GetActorZ(PlatTIDArray[WhichPlat]);
- int PlatAng = GetActorAngle(PlatTIDArray[WhichPlat]);
- //Actor Info
- int ActorVelX = GetActorVelX(0);
- int ActorVelY = GetActorVelY(0);
- int ActorVelZ = GetActorVelZ(0);
- int ActorHeight = GetActorProperty(0, APROP_Height);
- ActorHeight = ActorHeight << 16;
- int ActorRadius = GetActorProperty(0, APROP_Radius);
- ActorRadius = ActorRadius << 16;
- int ActorBigRadius = VectorLength(ActorRadius,ActorRadius);
- int ActorX = GetActorX(0);
- int ActorY = GetActorX(0);
- int ActorZ = GetActorX(0);
- int ActorAng = GetActorAngle(0);
- int ActorJumpH = (FixedMul(GetActorProperty(0,APROP_JumpZ),GetActorProperty(0,APROP_JumpZ)) / 2) + (GetActorProperty(0,APROP_Accuracy) << 16);
- //Collision Info
- int DistBet = VectorLength(PlatX - ActorX, PlatY - ActorY);
- int AngPlatOr = VectorAngle(ActorX - PlatX, ActorY - PlatY);
- int AngActOr = VectorAngle(PlatX - ActorX, PlatY - ActorY);
- int ActorBoxClosestX = ActorX;
- int ActorBoxClosestY = ActorY;
- int ActorClosestL = DistBet;
- for (int FindAngle = FixedAngMod(AngActOr - 0.25); FindAngle < FixedAngMod(AngActOr + 0.25); FindAngle = FixedAngMod(FindAngle + 0.001))
- {
- int RelAng = FixedAngMod(FindAngle - ActorAng);
- RelAng = (RelAng % 0.25);
- if (Relang > 0.125){ RelAng = 0.25 - RelAng; }
- int ActorArcL = FixedMul(cos(RelAng), ActorRadius);
- int ActorCheckX = FixedMul(sin(FindAngle), ActorArcL) + ActorX;
- int ActorCheckY = FixedMul(cos(FindAngle), ActorArcL) + ActorY;
- int ActorCheckL = VectorLength(PlatX - ActorCheckX, PlatY - ActorCheckY);
- if (ActorCheckL < ActorClosestL){
- ActorClosestL = ActorCheckL;
- ActorBoxClosestX = ActorCheckX;
- ActorBoxClosestY = ActorCheckY;}
- }
- int ActorUpLeftX = FixedMul(sin(FixedAngMod(ActorAng + 0.125)), ActorBigRadius) + ActorX;
- int ActorUpLeftY = FixedMul(cos(FixedAngMod(ActorAng + 0.125)), ActorBigRadius) + ActorY;
- int ActorUpRightX = FixedMul(sin(FixedAngMod(ActorAng + 0.875)), ActorBigRadius) + ActorX;
- int ActorUpRightY = FixedMul(cos(FixedAngMod(ActorAng + 0.875)), ActorBigRadius) + ActorY;
- int ActorBotLeftX = FixedMul(sin(FixedAngMod(ActorAng + 0.375)), ActorBigRadius) + ActorX;
- int ActorBotLeftY = FixedMul(cos(FixedAngMod(ActorAng + 0.375)), ActorBigRadius) + ActorY;
- int ActorBotRightX = FixedMul(sin(FixedAngMod(ActorAng + 0.625)), ActorBigRadius) + ActorX;
- int ActorBotRightY = FixedMul(cos(FixedAngMod(ActorAng + 0.625)), ActorBigRadius) + ActorY;
- int ActorGX = ActorUpLeftX;
- int ActorLX = ActorUpLeftX;
- if (ActorUpRightX > ActorGX){ ActorGX = ActorUpRightX; }
- else if (ActorUpRightX < ActorLX){ ActorLX = ActorUpRightX; }
- if (ActorBotLeftX > ActorGX){ ActorGX = ActorBotLeftX; }
- else if (ActorBotLeftX < ActorLX){ ActorLX = ActorBotLeftX; }
- if (ActorBotRightX > ActorGX){ ActorGX = ActorBotRightX; }
- else if (ActorBotRightX < ActorLX){ ActorLX = ActorBotRightX; }
- int ActorGY = ActorUpLeftY;
- int ActorLY = ActorUpLeftY;
- if (ActorUpRightY > ActorGY){ ActorGY = ActorUpRightY; }
- else if (ActorUpRightY < ActorLY){ ActorLY = ActorUpRightY; }
- if (ActorBotLeftY > ActorGY){ ActorGY = ActorBotLeftY; }
- else if (ActorBotLeftY < ActorLY){ ActorLY = ActorBotLeftY; }
- if (ActorBotRightY > ActorGY){ ActorGY = ActorBotRightY; }
- else if (ActorBotRightY < ActorLY){ ActorLY = ActorBotRightY; }
- int PlatBoxClosestX = PlatX;
- int PlatBoxClosestY = PlatY;
- int PlatClosestL = DistBet;
- for (FindAngle = FixedAngMod(AngPlatOr - 0.25); FindAngle < FixedAngMod(AngPlatOr + 0.25); FindAngle = FixedAngMod(FindAngle + 0.001))
- {
- RelAng = FixedAngMod(FindAngle - PlatAng);
- RelAng = (RelAng % 0.25);
- if (Relang > 0.125){ RelAng = 0.25 - RelAng; }
- int PlatArcL = FixedMul(cos(RelAng), PlatRadius);
- int PlatCheckX = FixedMul(sin(FindAngle), PlatArcL) + PlatX;
- int PlatCheckY = FixedMul(cos(FindAngle), PlatArcL) + PlatY;
- int PlatCheckL = VectorLength(ActorX - PlatCheckX, ActorY - PlatCheckY);
- if (PlatCheckL < PlatClosestL){
- PlatClosestL = PlatCheckL;
- PlatBoxClosestX = PlatCheckX;
- PlatBoxClosestY = PlatCheckY;}
- }
- int PlatUpLeftX = FixedMul(sin(FixedAngMod(PlatAng + 0.125)), PlatBigRadius) + PlatX;
- int PlatUpLeftY = FixedMul(cos(FixedAngMod(PlatAng + 0.125)), PlatBigRadius) + PlatY;
- int PlatUpRightX = FixedMul(sin(FixedAngMod(PlatAng + 0.875)), PlatBigRadius) + PlatX;
- int PlatUpRightY = FixedMul(cos(FixedAngMod(PlatAng + 0.875)), PlatBigRadius) + PlatY;
- int PlatBotLeftX = FixedMul(sin(FixedAngMod(PlatAng + 0.375)), PlatBigRadius) + PlatX;
- int PlatBotLeftY = FixedMul(cos(FixedAngMod(PlatAng + 0.375)), PlatBigRadius) + PlatY;
- int PlatBotRightX = FixedMul(sin(FixedAngMod(PlatAng + 0.625)), PlatBigRadius) + PlatX;
- int PlatBotRightY = FixedMul(cos(FixedAngMod(PlatAng + 0.625)), PlatBigRadius) + PlatY;
- int PlatGX = PlatUpLeftX;
- int PlatLX = PlatUpLeftX;
- if (PlatUpRightX > PlatGX){ PlatGX = PlatUpRightX; }
- else if (PlatUpRightX < PlatLX){ PlatLX = PlatUpRightX; }
- if (PlatBotLeftX > PlatGX){ PlatGX = PlatBotLeftX; }
- else if (PlatBotLeftX < PlatLX){ PlatLX = PlatBotLeftX; }
- if (PlatBotRightX > PlatGX){ PlatGX = PlatBotRightX; }
- else if (PlatBotRightX < PlatLX){ PlatLX = PlatBotRightX; }
- int PlatGY = PlatUpLeftY;
- int PlatLY = PlatUpLeftY;
- if (PlatUpRightY > PlatGY){ PlatGY = PlatUpRightY; }
- else if (PlatUpRightY < PlatLY){ PlatLY = PlatUpRightY; }
- if (PlatBotLeftY > PlatGY){ PlatGY = PlatBotLeftY; }
- else if (PlatBotLeftY < PlatLY){ PlatLY = PlatBotLeftY; }
- if (PlatBotRightY > PlatGY){ PlatGY = PlatBotRightY; }
- else if (PlatBotRightY < PlatLY){ PlatLY = PlatBotRightY; }
- //Overlap Checks
- if ( (VectorAngle(ActorBoxClosestX - PlatUpLeftX, ActorBoxClosestY - PlatUpLeftY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBoxClosestX - PlatUpLeftX, ActorBoxClosestY - PlatUpLeftY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBoxClosestX - PlatBotRightX, ActorBoxClosestY - PlatBotRightY) >= (PlatAng)) &&
- (VectorAngle(ActorBoxClosestX - PlatBotRightX, ActorBoxClosestY - PlatBotRightY) <= FixedAngMod(PlatAng + 0.25)) ){
- int ACloseInPlat = TRUE; } else{ ACloseInPlat = FALSE; }
- if ( (VectorAngle(ActorX - PlatUpLeftX, ActorY - PlatUpLeftY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorX - PlatUpLeftX, ActorY - PlatUpLeftY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorX - PlatBotRightX, ActorY - PlatBotRightY) >= (PlatAng)) &&
- (VectorAngle(ActorX - PlatBotRightX, ActorY - PlatBotRightY) <= FixedAngMod(PlatAng + 0.25)) ){
- int ACentInPlat = TRUE; } else{ ACentInPlat = FALSE; }
- if ( (VectorAngle(PlatBoxClosestX - ActorUpLeftX, PlatBoxClosestY - ActorUpLeftY) >= FixedAngMod(ActorAng + 0.5)) &&
- (VectorAngle(PlatBoxClosestX - ActorUpLeftX, PlatBoxClosestY - ActorUpLeftY) <= FixedAngMod(ActorAng + 0.75)) &&
- (VectorAngle(PlatBoxClosestX - ActorBotRightX, PlatBoxClosestY - ActorBotRightY) >= (ActorAng)) &&
- (VectorAngle(PlatBoxClosestX - ActorBotRightX, PlatBoxClosestY - ActorBotRightY) <= FixedAngMod(ActorAng + 0.25)) ){
- int PCloseInActor = TRUE; } else{ PCloseInActor = FALSE; }
- if ( (VectorAngle(PlatX - ActorUpLeftX, PlatY - ActorUpLeftY) >= FixedAngMod(ActorAng + 0.5)) &&
- (VectorAngle(PlatX - ActorUpLeftX, PlatY - ActorUpLeftY) <= FixedAngMod(ActorAng + 0.75)) &&
- (VectorAngle(PlatX - ActorBotRightX, PlatY - ActorBotRightY) >= (ActorAng)) &&
- (VectorAngle(PlatX - ActorBotRightX, PlatY - ActorBotRightY) <= FixedAngMod(ActorAng + 0.25)) ){
- int PCentInActor = TRUE; } else{ PCentInActor = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY, PlatUpRightX, PlatUpRightY,
- ActorUpLeftX, ActorUpLeftY, ActorUpRightX, ActorUpRightY)){
- int AB_hit_EF = TRUE; } else{ AB_hit_EF = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY, PlatUpRightX, PlatUpRightY,
- ActorUpRightX,ActorUpRightY, ActorBotRightX, ActorBotRightY)){
- int AB_hit_FG = TRUE; } else{ AB_hit_FG = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY, PlatUpRightX, PlatUpRightY,
- ActorBotRightX, ActorBotRightY, ActorBotLeftX, ActorBotLeftY)){
- int AB_hit_GH = TRUE; } else{ AB_hit_GH = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY, PlatUpRightX, PlatUpRightY,
- ActorBotLeftX, ActorBotLeftY, ActorUpLeftX, ActorUpLeftY)){
- int AB_hit_HE = TRUE; } else{ AB_hit_HE = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY, PlatBotRightX, PlatBotRightY,
- ActorUpLeftX, ActorUpLeftY, ActorUpRightX, ActorUpRightY)){
- int BC_hit_EF = TRUE; } else{ BC_hit_EF = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY, PlatBotRightX, PlatBotRightY,
- ActorUpRightX,ActorUpRightY, ActorBotRightX, ActorBotRightY)){
- int BC_hit_FG = TRUE; } else{ BC_hit_FG = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY, PlatBotRightX, PlatBotRightY,
- ActorBotRightX, ActorBotRightY, ActorBotLeftX, ActorBotLeftY)){
- int BC_hit_GH = TRUE; } else{ BC_hit_GH = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY, PlatBotRightX, PlatBotRightY,
- ActorBotLeftX, ActorBotLeftY, ActorUpLeftX, ActorUpLeftY)){
- int BC_hit_HE = TRUE; } else{ BC_hit_HE = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY, PlatBotLeftX, PlatBotLeftY,
- ActorUpLeftX, ActorUpLeftY, ActorUpRightX, ActorUpRightY)){
- int CD_hit_EF = TRUE; } else{ CD_hit_EF = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY, PlatBotLeftX, PlatBotLeftY,
- ActorUpRightX,ActorUpRightY, ActorBotRightX, ActorBotRightY)){
- int CD_hit_FG = TRUE; } else{ CD_hit_FG = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY, PlatBotLeftX, PlatBotLeftY,
- ActorBotRightX, ActorBotRightY, ActorBotLeftX, ActorBotLeftY)){
- int CD_hit_GH = TRUE; } else{ CD_hit_GH = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY, PlatBotLeftX, PlatBotLeftY,
- ActorBotLeftX, ActorBotLeftY, ActorUpLeftX, ActorUpLeftY)){
- int CD_hit_HE = TRUE; } else{ CD_hit_HE = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY, PlatUpLeftX, PlatUpLeftY,
- ActorUpLeftX, ActorUpLeftY, ActorUpRightX, ActorUpRightY)){
- int DA_hit_EF = TRUE; } else{ DA_hit_EF = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY, PlatUpLeftX, PlatUpLeftY,
- ActorUpRightX,ActorUpRightY, ActorBotRightX, ActorBotRightY)){
- int DA_hit_FG = TRUE; } else{ DA_hit_FG = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY, PlatUpLeftX, PlatUpLeftY,
- ActorBotRightX, ActorBotRightY, ActorBotLeftX, ActorBotLeftY)){
- int DA_hit_GH = TRUE; } else{ DA_hit_GH = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY, PlatUpLeftX, PlatUpLeftY,
- ActorBotLeftX, ActorBotLeftY, ActorUpLeftX, ActorUpLeftY)){
- int DA_hit_HE = TRUE; } else{ DA_hit_HE = FALSE; }
- //Collision Checks
- if ( (VectorAngle(ActorBoxClosestX - PlatUpLeftX - PVelX + ActorVelX, ActorBoxClosestY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBoxClosestX - PlatUpLeftX - PVelX + ActorVelX, ActorBoxClosestY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBoxClosestX - PlatBotRightX - PVelX + ActorVelX, ActorBoxClosestY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorBoxClosestX - PlatBotRightX - PVelX + ActorVelX, ActorBoxClosestY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlat1 = TRUE; } else{ PHitPlat1 = FALSE; }
- if ( (VectorAngle(ActorUpLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorUpLeftY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorUpLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorUpLeftY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorUpLeftX - PlatBotRightX - PVelX + ActorVelX, ActorUpLeftY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorUpLeftX - PlatBotRightX - PVelX + ActorVelX, ActorUpLeftY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlat2 = TRUE; } else{ PHitPlat2 = FALSE; }
- if ( (VectorAngle(ActorUpRightX - PlatUpLeftX - PVelX + ActorVelX, ActorUpRightY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorUpRightX - PlatUpLeftX - PVelX + ActorVelX, ActorUpRightY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorUpRightX - PlatBotRightX - PVelX + ActorVelX, ActorUpRightY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorUpRightX - PlatBotRightX - PVelX + ActorVelX, ActorUpRightY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlat3 = TRUE; } else{ PHitPlat3 = FALSE; }
- if ( (VectorAngle(ActorBotLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorBotLeftY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBotLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorBotLeftY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBotLeftX - PlatBotRightX - PVelX + ActorVelX, ActorBotLeftY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorBotLeftX - PlatBotRightX - PVelX + ActorVelX, ActorBotLeftY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlat4 = TRUE; } else{ PHitPlat4 = FALSE; }
- if ( (VectorAngle(ActorBotRightX - PlatUpLeftX - PVelX + ActorVelX, ActorBotRightY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBotRightX - PlatUpLeftX - PVelX + ActorVelX, ActorBotRightY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBotRightX - PlatBotRightX - PVelX + ActorVelX, ActorBotRightY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorBotRightX - PlatBotRightX - PVelX + ActorVelX, ActorBotRightY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlat5 = TRUE; } else{ PHitPlat5 = FALSE; }
- if ( (VectorAngle(ActorUpLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorUpLeftY - PlatUpLeftY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorUpLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorUpLeftY - PlatUpLeftY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorUpLeftX - PlatBotRightX - PVelX + ActorVelX, ActorUpLeftY - PlatBotRightY) >= (PlatAng)) &&
- (VectorAngle(ActorUpLeftX - PlatBotRightX - PVelX + ActorVelX, ActorUpLeftY - PlatBotRightY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatX1 = TRUE; } else{ PHitPlatX1 = FALSE; }
- if ( (VectorAngle(ActorUpRightX - PlatUpLeftX - PVelX + ActorVelX, ActorUpRightY - PlatUpLeftY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorUpRightX - PlatUpLeftX - PVelX + ActorVelX, ActorUpRightY - PlatUpLeftY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorUpRightX - PlatBotRightX - PVelX + ActorVelX, ActorUpRightY - PlatBotRightY) >= (PlatAng)) &&
- (VectorAngle(ActorUpRightX - PlatBotRightX - PVelX + ActorVelX, ActorUpRightY - PlatBotRightY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatX2 = TRUE; } else{ PHitPlatX2 = FALSE; }
- if ( (VectorAngle(ActorBotLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorBotLeftY - PlatUpLeftY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBotLeftX - PlatUpLeftX - PVelX + ActorVelX, ActorBotLeftY - PlatUpLeftY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBotLeftX - PlatBotRightX - PVelX + ActorVelX, ActorBotLeftY - PlatBotRightY) >= (PlatAng)) &&
- (VectorAngle(ActorBotLeftX - PlatBotRightX - PVelX + ActorVelX, ActorBotLeftY - PlatBotRightY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatX3 = TRUE; } else{ PHitPlatX3 = FALSE; }
- if ( (VectorAngle(ActorBotRightX - PlatUpLeftX - PVelX + ActorVelX, ActorBotRightY - PlatUpLeftY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBotRightX - PlatUpLeftX - PVelX + ActorVelX, ActorBotRightY - PlatUpLeftY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBotRightX - PlatBotRightX - PVelX + ActorVelX, ActorBotRightY - PlatBotRightY) >= (PlatAng)) &&
- (VectorAngle(ActorBotRightX - PlatBotRightX - PVelX + ActorVelX, ActorBotRightY - PlatBotRightY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatX4 = TRUE; } else{ PHitPlatX4 = FALSE; }
- if ( (VectorAngle(ActorUpLeftX - PlatUpLeftX, ActorUpLeftY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorUpLeftX - PlatUpLeftX, ActorUpLeftY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorUpLeftX - PlatBotRightX, ActorUpLeftY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorUpLeftX - PlatBotRightX, ActorUpLeftY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatY1 = TRUE; } else{ PHitPlatY1 = FALSE; }
- if ( (VectorAngle(ActorUpRightX - PlatUpLeftX, ActorUpRightY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorUpRightX - PlatUpLeftX, ActorUpRightY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorUpRightX - PlatBotRightX, ActorUpRightY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorUpRightX - PlatBotRightX, ActorUpRightY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatY2 = TRUE; } else{ PHitPlatY2 = FALSE; }
- if ( (VectorAngle(ActorBotLeftX - PlatUpLeftX, ActorBotLeftY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBotLeftX - PlatUpLeftX, ActorBotLeftY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBotLeftX - PlatBotRightX, ActorBotLeftY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorBotLeftX - PlatBotRightX, ActorBotLeftY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatY3 = TRUE; } else{ PHitPlatY3 = FALSE; }
- if ( (VectorAngle(ActorBotRightX - PlatUpLeftX, ActorBotRightY - PlatUpLeftY - PVelY + ActorVelY) >= FixedAngMod(PlatAng + 0.5)) &&
- (VectorAngle(ActorBotRightX - PlatUpLeftX, ActorBotRightY - PlatUpLeftY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.75)) &&
- (VectorAngle(ActorBotRightX - PlatBotRightX, ActorBotRightY - PlatBotRightY - PVelY + ActorVelY) >= (PlatAng)) &&
- (VectorAngle(ActorBotRightX - PlatBotRightX, ActorBotRightY - PlatBotRightY - PVelY + ActorVelY) <= FixedAngMod(PlatAng + 0.25)) ){
- int PHitPlatY4 = TRUE; } else{ PHitPlatY4 = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY + PVelY, PlatUpRightX + PVelX, PlatUpRightY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int AB_hitXY_EF = TRUE; } else{ AB_hitXY_EF = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY + PVelY, PlatUpRightX + PVelX, PlatUpRightY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int AB_hitXY_FG = TRUE; } else{ AB_hitXY_FG = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY + PVelY, PlatUpRightX + PVelX, PlatUpRightY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int AB_hitXY_GH = TRUE; } else{ AB_hitXY_GH = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY + PVelY, PlatUpRightX + PVelX, PlatUpRightY + PVelY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int AB_hitXY_HE = TRUE; } else{ AB_hitXY_HE = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY + PVelY, PlatBotRightX + PVelX, PlatBotRightY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int BC_hitXY_EF = TRUE; } else{ BC_hitXY_EF = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY + PVelY, PlatBotRightX + PVelX, PlatBotRightY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int BC_hitXY_FG = TRUE; } else{ BC_hitXY_FG = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY + PVelY, PlatBotRightX + PVelX, PlatBotRightY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int BC_hitXY_GH = TRUE; } else{ BC_hitXY_GH = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY + PVelY, PlatBotRightX + PVelX, PlatBotRightY + PVelY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int BC_hitXY_HE = TRUE; } else{ BC_hitXY_HE = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY + PVelY, PlatBotLeftX + PVelX, PlatBotLeftY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int CD_hitXY_EF = TRUE; } else{ CD_hitXY_EF = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY + PVelY, PlatBotLeftX + PVelX, PlatBotLeftY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int CD_hitXY_FG = TRUE; } else{ CD_hitXY_FG = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY + PVelY, PlatBotLeftX + PVelX, PlatBotLeftY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int CD_hitXY_GH = TRUE; } else{ CD_hitXY_GH = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY + PVelY, PlatBotLeftX + PVelX, PlatBotLeftY + PVelY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int CD_hitXY_HE = TRUE; } else{ CD_hitXY_HE = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY + PVelY, PlatUpLeftX + PVelX, PlatUpLeftY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int DA_hitXY_EF = TRUE; } else{ DA_hitXY_EF = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY + PVelY, PlatUpLeftX + PVelX, PlatUpLeftY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int DA_hitXY_FG = TRUE; } else{ DA_hitXY_FG = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY + PVelY, PlatUpLeftX + PVelX, PlatUpLeftY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int DA_hitXY_GH = TRUE; } else{ DA_hitXY_GH = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY + PVelY, PlatUpLeftX + PVelX, PlatUpLeftY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int DA_hitXY_HE = TRUE; } else{ DA_hitXY_HE = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY, PlatUpRightX + PVelX, PlatUpRightY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int AB_hitX_EF = TRUE; } else{ AB_hitX_EF = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY, PlatUpRightX + PVelX, PlatUpRightY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int AB_hitX_FG = TRUE; } else{ AB_hitX_FG = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY, PlatUpRightX + PVelX, PlatUpRightY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int AB_hitX_GH = TRUE; } else{ AB_hitX_GH = FALSE; }
- if(LineIntCheck(PlatUpLeftX + PVelX, PlatUpLeftY, PlatUpRightX + PVelX, PlatUpRightY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int AB_hitX_HE = TRUE; } else{ AB_hitX_HE = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY, PlatBotRightX + PVelX, PlatBotRightY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int BC_hitX_EF = TRUE; } else{ BC_hitX_EF = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY, PlatBotRightX + PVelX, PlatBotRightY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int BC_hitX_FG = TRUE; } else{ BC_hitX_FG = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY, PlatBotRightX + PVelX, PlatBotRightY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int BC_hitX_GH = TRUE; } else{ BC_hitX_GH = FALSE; }
- if(LineIntCheck(PlatUpRightX + PVelX, PlatUpRightY, PlatBotRightX + PVelX, PlatBotRightY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int BC_hitX_HE = TRUE; } else{ BC_hitX_HE = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY, PlatBotLeftX + PVelX, PlatBotLeftY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int CD_hitX_EF = TRUE; } else{ CD_hitX_EF = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY, PlatBotLeftX + PVelX, PlatBotLeftY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int CD_hitX_FG = TRUE; } else{ CD_hitX_FG = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY, PlatBotLeftX + PVelX, PlatBotLeftY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int CD_hitX_GH = TRUE; } else{ CD_hitX_GH = FALSE; }
- if(LineIntCheck(PlatBotRightX + PVelX, PlatBotRightY, PlatBotLeftX + PVelX, PlatBotLeftY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int CD_hitX_HE = TRUE; } else{ CD_hitX_HE = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY, PlatUpLeftX + PVelX, PlatUpLeftY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int DA_hitX_EF = TRUE; } else{ DA_hitX_EF = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY, PlatUpLeftX + PVelX, PlatUpLeftY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int DA_hitX_FG = TRUE; } else{ DA_hitX_FG = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY, PlatUpLeftX + PVelX, PlatUpLeftY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int DA_hitX_GH = TRUE; } else{ DA_hitX_GH = FALSE; }
- if(LineIntCheck(PlatBotLeftX + PVelX, PlatBotLeftY, PlatUpLeftX + PVelX, PlatUpLeftY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int DA_hitX_HE = TRUE; } else{ DA_hitX_HE = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY + PVelY, PlatUpRightX, PlatUpRightY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int AB_hitY_EF = TRUE; } else{ AB_hitY_EF = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY + PVelY, PlatUpRightX, PlatUpRightY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int AB_hitY_FG = TRUE; } else{ AB_hitY_FG = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY + PVelY, PlatUpRightX, PlatUpRightY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int AB_hitY_GH = TRUE; } else{ AB_hitY_GH = FALSE; }
- if(LineIntCheck(PlatUpLeftX, PlatUpLeftY + PVelY, PlatUpRightX, PlatUpRightY + PVelY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int AB_hitY_HE = TRUE; } else{ AB_hitY_HE = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY + PVelY, PlatBotRightX, PlatBotRightY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int BC_hitY_EF = TRUE; } else{ BC_hitY_EF = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY + PVelY, PlatBotRightX, PlatBotRightY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int BC_hitY_FG = TRUE; } else{ BC_hitY_FG = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY + PVelY, PlatBotRightX, PlatBotRightY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int BC_hitY_GH = TRUE; } else{ BC_hitY_GH = FALSE; }
- if(LineIntCheck(PlatUpRightX, PlatUpRightY + PVelY, PlatBotRightX, PlatBotRightY + PVelY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int BC_hitY_HE = TRUE; } else{ BC_hitY_HE = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY + PVelY, PlatBotLeftX, PlatBotLeftY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int CD_hitY_EF = TRUE; } else{ CD_hitY_EF = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY + PVelY, PlatBotLeftX, PlatBotLeftY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int CD_hitY_FG = TRUE; } else{ CD_hitY_FG = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY + PVelY, PlatBotLeftX, PlatBotLeftY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int CD_hitY_GH = TRUE; } else{ CD_hitY_GH = FALSE; }
- if(LineIntCheck(PlatBotRightX, PlatBotRightY + PVelY, PlatBotLeftX, PlatBotLeftY + PVelY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int CD_hitY_HE = TRUE; } else{ CD_hitY_HE = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY + PVelY, PlatUpLeftX, PlatUpLeftY + PVelY,
- ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY, ActorUpRightX + ActorVelX, ActorUpRightY + ActorVelY)){
- int DA_hitY_EF = TRUE; } else{ DA_hitY_EF = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY + PVelY, PlatUpLeftX, PlatUpLeftY + PVelY,
- ActorUpRightX + ActorVelX,ActorUpRightY + ActorVelY, ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY)){
- int DA_hitY_FG = TRUE; } else{ DA_hitY_FG = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY + PVelY, PlatUpLeftX, PlatUpLeftY + PVelY,
- ActorBotRightX + ActorVelX, ActorBotRightY + ActorVelY, ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY)){
- int DA_hitY_GH = TRUE; } else{ DA_hitY_GH = FALSE; }
- if(LineIntCheck(PlatBotLeftX, PlatBotLeftY + PVelY, PlatUpLeftX, PlatUpLeftY,
- ActorBotLeftX + ActorVelX, ActorBotLeftY + ActorVelY, ActorUpLeftX + ActorVelX, ActorUpLeftY + ActorVelY)){
- int DA_hitY_HE = TRUE; } else{ DA_hitY_HE = FALSE; }
- //The actual script purpose
- if( ((ActorZ >= (PlatZ - PVelZ)) && (ActorZ <= (PlatZ - PVelZ + ZTolerance)) )
- && ((ACloseInPlat || ACentInPlat || PCloseInActor || PCentInActor) ||
- (AB_hit_EF || AB_hit_FG || AB_hit_GH || AB_hit_HE
- || BC_hit_EF || BC_hit_FG || BC_hit_GH || BC_hit_HE
- || CD_hit_EF || CD_hit_FG || CD_hit_GH || CD_hit_HE
- || DA_hit_EF || DA_hit_FG || DA_hit_GH || DA_hit_HE)) ){
- GiveInventory("OnPlatform",2);
- GiveInventory("OnPlatformTimer",2);
- int NewActorVelX = PVelX - FixedMul(GetLastPVelX(0) , FLOOR_FRICTION);
- int NewActorVelY = PVelY - FixedMul(GetLastPVelY(0) , FLOOR_FRICTION);
- int NewActorVelZ = PVelZ - FixedMul(GetLastPVelZ(0) , FLOOR_FRICTION);
- SetLastPVelX(0, PVelX);
- SetLastPVelY(0, PVelY);
- SetLastPVelZ(0, PVelZ);}
- else if( ( (ActorZ > (PlatZ - PVelZ + ZTolerance)) && (ActorZ <= (PlatZ - PVelZ + ZTolerance + ActorJumpH)) )
- && (ACloseInPlat || ACentInPlat || PCloseInActor || PCentInActor)
- && ( (ClassifyActor(0) & ACTOR_PLAYER) ) ){
- GiveInventory("OnPlatform",2);
- NewActorVelX = 0;
- NewActorVelY = 0;
- NewActorVelZ = 0;
- SetLastPVelX(0, FixedMul(GetLastPVelX(0) , FLOOR_FRICTION));
- SetLastPVelY(0, FixedMul(GetLastPVelY(0) , FLOOR_FRICTION));
- SetLastPVelZ(0, FixedMul(GetLastPVelZ(0) , FLOOR_FRICTION));}
- else if( (((ActorZ + ActorHeight + 1.0) > (PlatZ - PVelZ)) && (ActorZ < (PlatZ - PVelZ + ZTolerance)) )
- && ((PHitPlat1 || PHitPlat2 || PHitPlat3 || PHitPlat4 || PHitPlat5) ||
- (AB_hitXY_EF || AB_hitXY_FG || AB_hitXY_GH || AB_hitXY_HE
- || BC_hitXY_EF || BC_hitXY_FG || BC_hitXY_GH || BC_hitXY_HE
- || CD_hitXY_EF || CD_hitXY_FG || CD_hitXY_GH || CD_hitXY_HE
- || DA_hitXY_EF || DA_hitXY_FG || DA_hitXY_GH || DA_hitXY_HE)) ){
- if( (PVelX == !0) && (PVelY == !0)
- && ( ((PHitPlatX1 || PHitPlatX2 || PHitPlatX3 || PHitPlatX4)
- && (PHitPlatY1 || PHitPlatY2 || PHitPlatY3 || PHitPlatY4)) ||
- (AB_hitX_EF || AB_hitX_FG || AB_hitX_GH || AB_hitX_HE
- || BC_hitX_EF || BC_hitX_FG || BC_hitX_GH || BC_hitX_HE
- || CD_hitX_EF || CD_hitX_FG || CD_hitX_GH || CD_hitX_HE
- || DA_hitX_EF || DA_hitX_FG || DA_hitX_GH || DA_hitX_HE) &&
- (AB_hitY_EF || AB_hitY_FG || AB_hitY_GH || AB_hitY_HE
- || BC_hitY_EF || BC_hitY_FG || BC_hitY_GH || BC_hitY_HE
- || CD_hitY_EF || CD_hitY_FG || CD_hitY_GH || CD_hitY_HE
- || DA_hitY_EF || DA_hitY_FG || DA_hitY_GH || DA_hitY_HE)) ){
- }
- else if( (PVelX == !0)
- && ( (PHitPlatX1 || PHitPlatX2 || PHitPlatX3 || PHitPlatX4) ||
- (AB_hitX_EF || AB_hitX_FG || AB_hitX_GH || AB_hitX_HE
- || BC_hitX_EF || BC_hitX_FG || BC_hitX_GH || BC_hitX_HE
- || CD_hitX_EF || CD_hitX_FG || CD_hitX_GH || CD_hitX_HE
- || DA_hitX_EF || DA_hitX_FG || DA_hitX_GH || DA_hitX_HE) ) ){
- }
- else if( (PVelY == !0)
- && ( (PHitPlatY1 || PHitPlatY2 || PHitPlatY3 || PHitPlatY4) ||
- (AB_hitY_EF || AB_hitY_FG || AB_hitY_GH || AB_hitY_HE
- || BC_hitY_EF || BC_hitY_FG || BC_hitY_GH || BC_hitY_HE
- || CD_hitY_EF || CD_hitY_FG || CD_hitY_GH || CD_hitY_HE
- || DA_hitY_EF || DA_hitY_FG || DA_hitY_GH || DA_hitY_HE) ) ){
- }
- }
- SetActorVelocity(0,NewActorVelX,NewActorVelY,NewActorVelZ,TRUE,FALSE);
- Terminate;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement