Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Unify collision #122

Merged
merged 4 commits into from

3 participants

@wareya

This should fix just about everything. If it (somehow) doesn't, then whatever it introduces will surely be a hell of a lot less obnoxious than the bugs we've dealt with for so long.

wareya added some commits
@wareya wareya Unify collision
- Also, remove the 4/1 joke.
- Make object names and locations more consistent... It's not like anybody else is touching these, right? Right?
1118307
@wareya wareya Fix a group of situational collision bugs bb66c87
@wareya wareya Code deduplication dac484a
@wareya wareya Overhaul collision system
- Manually run physics/collision in Step now
- Uses a tracer!
- Manually aggressively tested, gotten to a point where it behaves like GG2
- Reorganize some stuff to make code simpler
-- Haven't sanity checked it
This needs a big beta test.
438081c
@TazeTSchnitzel TazeTSchnitzel commented on the diff
.../gg2/Objects/InGameElements/Character.events/Draw.xml
@@ -17,7 +17,15 @@
yoffset = view_yview[0];
xsize = view_wview[0];
ysize = view_hview[0];
-
+
+draw_set_color(c_white)
+draw_set_alpha(1);
+draw_set_halign(fa_left);
+draw_text(xoffset+10, yoffset+10, string(hspeed))
+draw_text(xoffset+10, yoffset+20, string(x-oldx_move))
+draw_text(xoffset+10, yoffset+35, string(vspeed))
+draw_text(xoffset+10, yoffset+45, string(y-oldy_move))

Why is this here? This looks like debugging code left in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Medo42 Medo42 merged commit 727a51f into Medo42:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 1, 2013
  1. @wareya

    Unify collision

    wareya authored
    - Also, remove the 4/1 joke.
    - Make object names and locations more consistent... It's not like anybody else is touching these, right? Right?
Commits on Apr 3, 2013
  1. @wareya
  2. @wareya

    Code deduplication

    wareya authored
Commits on May 10, 2013
  1. @wareya

    Overhaul collision system

    wareya authored
    - Manually run physics/collision in Step now
    - Uses a tracer!
    - Manually aggressively tested, gotten to a point where it behaves like GG2
    - Reorganize some stuff to make code simpler
    -- Haven't sanity checked it
    This needs a big beta test.
This page is out of date. Refresh to see the latest.
Showing with 473 additions and 366 deletions.
  1. +1 −0  Source/gg2/Constants.xml
  2. +4 −0 Source/gg2/Objects/InGameElements/Character.events/Begin Step.xml
  3. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueIntelGate.xml
  4. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueIntelGate2.xml
  5. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueTeamGate.xml
  6. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueTeamGate2.xml
  7. +0 −33 Source/gg2/Objects/InGameElements/Character.events/Collision with Character.xml
  8. +0 −21 Source/gg2/Objects/InGameElements/Character.events/Collision with ControlPointSetupGate.xml
  9. +0 −26 Source/gg2/Objects/InGameElements/Character.events/Collision with IntelGateHorizontal.xml
  10. +0 −26 Source/gg2/Objects/InGameElements/Character.events/Collision with IntelGateVertical.xml
  11. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedIntelGate.xml
  12. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedIntelGate2.xml
  13. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedTeamGate.xml
  14. +0 −29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedTeamGate2.xml
  15. +9 −1 Source/gg2/Objects/InGameElements/Character.events/Draw.xml
  16. +6 −0 Source/gg2/Objects/InGameElements/Character.events/End Step.xml
  17. +5 −0 Source/gg2/Objects/InGameElements/Character.events/Step.xml
  18. +1 −1  .../gg2/Objects/Map elements/{Gates_Doors/Parent Objects/IntelGate.xml → Colliders/CharacterCollider.xml}
  19. 0  ...gg2/Objects/Map elements/{Gates_Doors/Bullet Wall → Colliders/Gates_Doors/Bullet Walls}/BulletWall.xml
  20. 0  ...s/Map elements/{Gates_Doors/Bullet Wall → Colliders/Gates_Doors/Bullet Walls}/BulletWallHorizontal.xml
  21. 0  ...jects/Map elements/{Gates_Doors/Bullet Wall → Colliders/Gates_Doors/Bullet Walls/Special}/LeftDoor.xml
  22. 0  ...ects/Map elements/{Gates_Doors/Bullet Wall → Colliders/Gates_Doors/Bullet Walls/Special}/RightDoor.xml
  23. +5 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Bullet Walls/Special/_resources.list.xml
  24. +1 −2  ...bjects/Map elements/{Gates_Doors/Bullet Wall → Colliders/Gates_Doors/Bullet Walls}/_resources.list.xml
  25. +3 −2 ...on with Obstacle.xml → Map elements/Colliders/Gates_Doors/Intel Gates/BlueIntelGate.events/Create.xml}
  26. 0  ...g2/Objects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/BlueIntelGate.xml
  27. +3 −2 ...with PlayerWall.xml → Map elements/Colliders/Gates_Doors/Intel Gates/BlueIntelGate2.events/Create.xml}
  28. 0  ...2/Objects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/BlueIntelGate2.xml
  29. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Intel Gates/IntelGateHorizontal.events/Create.xml
  30. 0  ...ects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/IntelGateHorizontal.xml
  31. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Intel Gates/IntelGateVertical.events/Create.xml
  32. 0  ...bjects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/IntelGateVertical.xml
  33. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Intel Gates/RedIntelGate.events/Create.xml
  34. 0  ...gg2/Objects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/RedIntelGate.xml
  35. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Intel Gates/RedIntelGate2.events/Create.xml
  36. 0  ...g2/Objects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/RedIntelGate2.xml
  37. 0  .../Objects/Map elements/{Gates_Doors/Intel Gate → Colliders/Gates_Doors/Intel Gates}/_resources.list.xml
  38. +10 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Parent Objects/Gate.xml
  39. +10 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Parent Objects/IntelGate.xml
  40. +1 −1  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Parent Objects/TeamGate.xml
  41. +1 −0  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Parent Objects/_resources.list.xml
  42. +1 −1  ...g2/Objects/Map elements/{Gates_Doors/Player Gates → Colliders/Gates_Doors/Player Walls}/PlayerWall.xml
  43. +1 −1  .../Map elements/{Gates_Doors/Player Gates → Colliders/Gates_Doors/Player Walls}/PlayerWallHorizontal.xml
  44. 0  ...jects/Map elements/{Gates_Doors/Player Gates → Colliders/Gates_Doors/Player Walls}/_resources.list.xml
  45. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/BlueTeamGate.events/Create.xml
  46. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Team Gates/BlueTeamGate.xml
  47. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/BlueTeamGate2.events/Create.xml
  48. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Team Gates/BlueTeamGate2.xml
  49. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/RedTeamGate.events/Create.xml
  50. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Team Gates/RedTeamGate.xml
  51. +22 −0 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/RedTeamGate2.events/Create.xml
  52. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Team Gates/RedTeamGate2.xml
  53. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/Team Gates/_resources.list.xml
  54. +3 −3 Source/gg2/Objects/Map elements/{ → Colliders}/Gates_Doors/_resources.list.xml
  55. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/Box.xml
  56. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/HighObstacle.xml
  57. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/HighObstacleSml.xml
  58. +2 −2 ...s/Collision with PlayerWallHorizontal.xml → Map elements/Colliders/Obstacles/Obstacle.events/Step.xml}
  59. +1 −1  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/Obstacle.xml
  60. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/ObstacleSml.xml
  61. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/WideObstacle.xml
  62. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/WideObstacleSml.xml
  63. 0  Source/gg2/Objects/Map elements/{ → Colliders}/Obstacles/_resources.list.xml
  64. +6 −0 Source/gg2/Objects/Map elements/Colliders/_resources.list.xml
  65. +1 −2  Source/gg2/Objects/Map elements/_resources.list.xml
  66. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ArenaHUD.events/Create.xml
  67. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ArenaHUD.events/Draw.xml
  68. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ArenaHUD.events/Step.xml
  69. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ArenaHUD.events/User Event 12.xml
  70. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ArenaHUD.events/User Event 13.xml
  71. +1 −1  Source/gg2/Objects/Overlays/{ → Gamemodes}/ArenaHUD.xml
  72. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ControlPointHUD.events/Create.xml
  73. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ControlPointHUD.events/Draw.xml
  74. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ControlPointHUD.events/Step.xml
  75. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ControlPointHUD.events/User Event 12.xml
  76. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ControlPointHUD.events/User Event 13.xml
  77. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ControlPointHUD.xml
  78. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/DKothHUD.events/Create.xml
  79. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/DKothHUD.events/Draw.xml
  80. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/DKothHUD.events/Step.xml
  81. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/DKothHUD.events/User Event 12.xml
  82. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/DKothHUD.events/User Event 13.xml
  83. +1 −1  Source/gg2/Objects/Overlays/{ → Gamemodes}/DKothHUD.xml
  84. +10 −0 Source/gg2/Objects/Overlays/Gamemodes/FauxCPHUD.xml
  85. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/GeneratorHUD.events/Create.xml
  86. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/GeneratorHUD.events/Draw.xml
  87. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/GeneratorHUD.events/Step.xml
  88. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/GeneratorHUD.events/User Event 12.xml
  89. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/GeneratorHUD.events/User Event 13.xml
  90. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/GeneratorHUD.xml
  91. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/KothHUD.events/Create.xml
  92. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/KothHUD.events/Draw.xml
  93. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/KothHUD.events/Step.xml
  94. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/KothHUD.events/User Event 12.xml
  95. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/KothHUD.events/User Event 13.xml
  96. +1 −1  Source/gg2/Objects/Overlays/{ → Gamemodes}/KothHUD.xml
  97. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ScorePanel.events/Create.xml
  98. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ScorePanel.events/Draw.xml
  99. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ScorePanel.events/Step.xml
  100. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ScorePanel.events/User Event 12.xml
  101. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ScorePanel.events/User Event 13.xml
  102. 0  Source/gg2/Objects/Overlays/{ → Gamemodes}/ScorePanel.xml
  103. +10 −0 Source/gg2/Objects/Overlays/Gamemodes/_resources.list.xml
  104. +1 −6 Source/gg2/Objects/Overlays/_resources.list.xml
  105. +3 −0  Source/gg2/Scripts/Macro/_resources.list.xml
  106. +9 −0 Source/gg2/Scripts/Macro/charSetAllSolids.gml
  107. +13 −0 Source/gg2/Scripts/Macro/charSetSolids.gml
  108. +7 −0 Source/gg2/Scripts/Macro/charUnsetSolids.gml
  109. +2 −0  Source/gg2/Scripts/_resources.list.xml
  110. +45 −0 Source/gg2/Scripts/charFixFringes.gml
  111. +119 −0 Source/gg2/Scripts/charRunPhysics.gml
View
1  Source/gg2/Constants.xml
@@ -63,6 +63,7 @@
<constant name="TEAM_RED" value="0"/>
<constant name="TEAM_BLUE" value="1"/>
<constant name="TEAM_SPECTATOR" value="2"/>
+ <constant name="TEAM_ANY" value="3"/>
<constant name="CLASS_SCOUT" value="0"/>
<constant name="CLASS_SOLDIER" value="1"/>
<constant name="CLASS_SNIPER" value="2"/>
View
4 Source/gg2/Objects/InGameElements/Character.events/Begin Step.xml
@@ -198,6 +198,8 @@ if(abs(hspeed)&lt;0.195 /*and not moveStatus = 3*/) { // Overweight carrying int
animationImage=0;
}
+charSetSolids();
+
if(place_free(x,y+1)) {
vspeed += 0.6;
if(vspeed&gt;10) {
@@ -210,6 +212,8 @@ if(place_free(x,y+1)) {
}
}
+charUnsetSolids();
+
if (intel)
{
if (random(1) &gt; 0.90 &amp;&amp; speed &gt; 0.195)
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueIntelGate.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="BlueIntelGate">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if (team == TEAM_BLUE || intel == false || global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueIntelGate2.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="BlueIntelGate2">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if (team == TEAM_BLUE || intel == false || global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueTeamGate.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="BlueTeamGate">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if ((team == TEAM_BLUE and !intel) or global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with BlueTeamGate2.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="BlueTeamGate2">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if ((team == TEAM_BLUE and !intel) or global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
33 Source/gg2/Objects/InGameElements/Character.events/Collision with Character.xml
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="Character">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">// April fools 2013 - Footpop asked for enemy bodyblocking
-// We'll take this out again on April 2nd or so
-if (speed &gt; 0)
-{
- if (team == other.team)
- other.solid = false;
- else
- other.solid = true;
-
- characterHitObstacle();
-
- other.solid = false;
-}
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
21 Source/gg2/Objects/InGameElements/Character.events/Collision with ControlPointSetupGate.xml
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="ControlPointSetupGate">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">characterHitObstacle();
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
26 Source/gg2/Objects/InGameElements/Character.events/Collision with IntelGateHorizontal.xml
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="IntelGateHorizontal">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if (intel == false || global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
26 Source/gg2/Objects/InGameElements/Character.events/Collision with IntelGateVertical.xml
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="IntelGateVertical">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if (intel == false || global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedIntelGate.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="RedIntelGate">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if (team == TEAM_RED || intel == false || global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedIntelGate2.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="RedIntelGate2">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if (team == TEAM_RED || intel == false || global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedTeamGate.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="RedTeamGate">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if ((team == TEAM_RED and !intel) or global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
29 Source/gg2/Objects/InGameElements/Character.events/Collision with RedTeamGate2.xml
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="RedTeamGate2">
- <actions>
- <action id="603" library="1">
- <!--action name: Code-->
- <kind>CODE</kind>
- <allowRelative>false</allowRelative>
- <question>false</question>
- <canApplyTo>true</canApplyTo>
- <actionType>CODE</actionType>
- <functionName/>
- <relative>false</relative>
- <not>false</not>
- <appliesTo>.self</appliesTo>
- <arguments>
- <argument kind="STRING">if ((team == TEAM_RED and !intel) or global.mapchanging)
- other.solid = false;
-else
- other.solid = true;
-
-characterHitObstacle();
-
-other.solid = false;
-
-</argument>
- </arguments>
- </action>
- </actions>
-</event>
View
10 Source/gg2/Objects/InGameElements/Character.events/Draw.xml
@@ -17,7 +17,15 @@
yoffset = view_yview[0];
xsize = view_wview[0];
ysize = view_hview[0];
-
+
+draw_set_color(c_white)
+draw_set_alpha(1);
+draw_set_halign(fa_left);
+draw_text(xoffset+10, yoffset+10, string(hspeed))
+draw_text(xoffset+10, yoffset+20, string(x-oldx_move))
+draw_text(xoffset+10, yoffset+35, string(vspeed))
+draw_text(xoffset+10, yoffset+45, string(y-oldy_move))

Why is this here? This looks like debugging code left in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
if (distance_to_point(xoffset+xsize/2,yoffset+ysize/2) &gt; 800)
exit;
View
6 Source/gg2/Objects/InGameElements/Character.events/End Step.xml
@@ -14,6 +14,9 @@
<appliesTo>.self</appliesTo>
<arguments>
<argument kind="STRING">// Climbing down stairs
+
+charSetSolids();
+
if(vspeed == 0) // if we aren't falling this frame
{
if(place_free(x,y+6))
@@ -24,6 +27,9 @@ if(vspeed == 0) // if we aren't falling this frame
}
xprevious = x;
yprevious = y;
+
+
+charUnsetSolids();
if(global.isHost &amp;&amp; hp&lt;=0) {
var assistant;
View
5 Source/gg2/Objects/InGameElements/Character.events/Step.xml
@@ -15,6 +15,11 @@
<arguments>
<argument kind="STRING">speed = min(speed, 15);
timeUnscathed = min(timeUnscathed+1, 10*30);
+
+charSetSolids();
+charRunPhysics();
+charUnsetSolids();
+
</argument>
</arguments>
</action>
View
2  .../Gates_Doors/Parent Objects/IntelGate.xml → ... elements/Colliders/CharacterCollider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<object id="516">
+<object id="813">
<sprite/>
<solid>false</solid>
<visible>true</visible>
View
0  ...ts/Gates_Doors/Bullet Wall/BulletWall.xml → ...s/Gates_Doors/Bullet Walls/BulletWall.xml
File renamed without changes
View
0  ...oors/Bullet Wall/BulletWallHorizontal.xml → ...ors/Bullet Walls/BulletWallHorizontal.xml
File renamed without changes
View
0  ...ents/Gates_Doors/Bullet Wall/LeftDoor.xml → ...s_Doors/Bullet Walls/Special/LeftDoor.xml
File renamed without changes
View
0  ...nts/Gates_Doors/Bullet Wall/RightDoor.xml → ..._Doors/Bullet Walls/Special/RightDoor.xml
File renamed without changes
View
5 ...e/gg2/Objects/Map elements/Colliders/Gates_Doors/Bullet Walls/Special/_resources.list.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<resources>
+ <resource name="LeftDoor" type="RESOURCE"/>
+ <resource name="RightDoor" type="RESOURCE"/>
+</resources>
View
3  ...tes_Doors/Bullet Wall/_resources.list.xml → ...es_Doors/Bullet Walls/_resources.list.xml
@@ -2,6 +2,5 @@
<resources>
<resource name="BulletWall" type="RESOURCE"/>
<resource name="BulletWallHorizontal" type="RESOURCE"/>
- <resource name="RightDoor" type="RESOURCE"/>
- <resource name="LeftDoor" type="RESOURCE"/>
+ <resource name="Special" type="GROUP"/>
</resources>
View
5 ...racter.events/Collision with Obstacle.xml → ...tel Gates/BlueIntelGate.events/Create.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="Obstacle">
+<event category="CREATE" id="0">
<actions>
<action id="603" library="1">
<!--action name: Code-->
@@ -13,7 +13,8 @@
<not>false</not>
<appliesTo>.self</appliesTo>
<arguments>
- <argument kind="STRING">characterHitObstacle();
+ <argument kind="STRING">team = TEAM_BLUE;
+
</argument>
</arguments>
</action>
View
0  .../Gates_Doors/Intel Gate/BlueIntelGate.xml → ...Gates_Doors/Intel Gates/BlueIntelGate.xml
File renamed without changes
View
5 ...cter.events/Collision with PlayerWall.xml → ...el Gates/BlueIntelGate2.events/Create.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="PlayerWall">
+<event category="CREATE" id="0">
<actions>
<action id="603" library="1">
<!--action name: Code-->
@@ -13,7 +13,8 @@
<not>false</not>
<appliesTo>.self</appliesTo>
<arguments>
- <argument kind="STRING">characterHitObstacle();
+ <argument kind="STRING">team = TEAM_BLUE;
+
</argument>
</arguments>
</action>
View
0  ...Gates_Doors/Intel Gate/BlueIntelGate2.xml → ...ates_Doors/Intel Gates/BlueIntelGate2.xml
File renamed without changes
View
22 ...ects/Map elements/Colliders/Gates_Doors/Intel Gates/IntelGateHorizontal.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_ANY;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  ..._Doors/Intel Gate/IntelGateHorizontal.xml → ...Doors/Intel Gates/IntelGateHorizontal.xml
File renamed without changes
View
22 ...bjects/Map elements/Colliders/Gates_Doors/Intel Gates/IntelGateVertical.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_ANY;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  ...es_Doors/Intel Gate/IntelGateVertical.xml → ...s_Doors/Intel Gates/IntelGateVertical.xml
File renamed without changes
View
22 ...gg2/Objects/Map elements/Colliders/Gates_Doors/Intel Gates/RedIntelGate.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_RED;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  ...s/Gates_Doors/Intel Gate/RedIntelGate.xml → .../Gates_Doors/Intel Gates/RedIntelGate.xml
File renamed without changes
View
22 ...g2/Objects/Map elements/Colliders/Gates_Doors/Intel Gates/RedIntelGate2.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_RED;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  .../Gates_Doors/Intel Gate/RedIntelGate2.xml → ...Gates_Doors/Intel Gates/RedIntelGate2.xml
File renamed without changes
View
0  ...ates_Doors/Intel Gate/_resources.list.xml → ...tes_Doors/Intel Gates/_resources.list.xml
File renamed without changes
View
10 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Parent Objects/Gate.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<object id="810">
+ <sprite/>
+ <solid>false</solid>
+ <visible>true</visible>
+ <depth>0</depth>
+ <persistent>false</persistent>
+ <parent>CharacterCollider</parent>
+ <mask/>
+</object>
View
10 Source/gg2/Objects/Map elements/Colliders/Gates_Doors/Parent Objects/IntelGate.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<object id="516">
+ <sprite/>
+ <solid>false</solid>
+ <visible>true</visible>
+ <depth>0</depth>
+ <persistent>false</persistent>
+ <parent>Gate</parent>
+ <mask/>
+</object>
View
2  ...s/Gates_Doors/Parent Objects/TeamGate.xml → ...s/Gates_Doors/Parent Objects/TeamGate.xml
@@ -5,6 +5,6 @@
<visible>true</visible>
<depth>0</depth>
<persistent>false</persistent>
- <parent/>
+ <parent>Gate</parent>
<mask/>
</object>
View
1  ..._Doors/Parent Objects/_resources.list.xml → ..._Doors/Parent Objects/_resources.list.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resources>
+ <resource name="Gate" type="RESOURCE"/>
<resource name="TeamGate" type="RESOURCE"/>
<resource name="IntelGate" type="RESOURCE"/>
</resources>
View
2  ...s/Gates_Doors/Player Gates/PlayerWall.xml → ...s/Gates_Doors/Player Walls/PlayerWall.xml
@@ -5,6 +5,6 @@
<visible>false</visible>
<depth>0</depth>
<persistent>false</persistent>
- <parent/>
+ <parent>CharacterCollider</parent>
<mask/>
</object>
View
2  ...ors/Player Gates/PlayerWallHorizontal.xml → ...ors/Player Walls/PlayerWallHorizontal.xml
@@ -5,6 +5,6 @@
<visible>false</visible>
<depth>0</depth>
<persistent>false</persistent>
- <parent/>
+ <parent>PlayerWall</parent>
<mask/>
</object>
View
0  ...es_Doors/Player Gates/_resources.list.xml → ...es_Doors/Player Walls/_resources.list.xml
File renamed without changes
View
22 .../gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/BlueTeamGate.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_BLUE;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  ...s/Gates_Doors/Team Gates/BlueTeamGate.xml → ...s/Gates_Doors/Team Gates/BlueTeamGate.xml
File renamed without changes
View
22 ...gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/BlueTeamGate2.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_BLUE;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  .../Gates_Doors/Team Gates/BlueTeamGate2.xml → .../Gates_Doors/Team Gates/BlueTeamGate2.xml
File renamed without changes
View
22 ...e/gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/RedTeamGate.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_RED;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  ...ts/Gates_Doors/Team Gates/RedTeamGate.xml → ...rs/Gates_Doors/Team Gates/RedTeamGate.xml
File renamed without changes
View
22 .../gg2/Objects/Map elements/Colliders/Gates_Doors/Team Gates/RedTeamGate2.events/Create.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<event category="CREATE" id="0">
+ <actions>
+ <action id="603" library="1">
+ <!--action name: Code-->
+ <kind>CODE</kind>
+ <allowRelative>false</allowRelative>
+ <question>false</question>
+ <canApplyTo>true</canApplyTo>
+ <actionType>CODE</actionType>
+ <functionName/>
+ <relative>false</relative>
+ <not>false</not>
+ <appliesTo>.self</appliesTo>
+ <arguments>
+ <argument kind="STRING">team = TEAM_RED;
+
+</argument>
+ </arguments>
+ </action>
+ </actions>
+</event>
View
0  ...s/Gates_Doors/Team Gates/RedTeamGate2.xml → ...s/Gates_Doors/Team Gates/RedTeamGate2.xml
File renamed without changes
View
0  ...ates_Doors/Team Gates/_resources.list.xml → ...ates_Doors/Team Gates/_resources.list.xml
File renamed without changes
View
6 ... elements/Gates_Doors/_resources.list.xml → ...Colliders/Gates_Doors/_resources.list.xml
@@ -2,7 +2,7 @@
<resources>
<resource name="Parent Objects" type="GROUP"/>
<resource name="Team Gates" type="GROUP"/>
- <resource name="Intel Gate" type="GROUP"/>
- <resource name="Player Gates" type="GROUP"/>
- <resource name="Bullet Wall" type="GROUP"/>
+ <resource name="Intel Gates" type="GROUP"/>
+ <resource name="Player Walls" type="GROUP"/>
+ <resource name="Bullet Walls" type="GROUP"/>
</resources>
View
0  ...g2/Objects/Map elements/Obstacles/Box.xml → .../Map elements/Colliders/Obstacles/Box.xml
File renamed without changes
View
0  ...s/Map elements/Obstacles/HighObstacle.xml → ...ents/Colliders/Obstacles/HighObstacle.xml
File renamed without changes
View
0  ...ap elements/Obstacles/HighObstacleSml.xml → ...s/Colliders/Obstacles/HighObstacleSml.xml
File renamed without changes
View
4 ...s/Collision with PlayerWallHorizontal.xml → ...liders/Obstacles/Obstacle.events/Step.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<event category="COLLISION" with="PlayerWallHorizontal">
+<event category="STEP" id="0">
<actions>
<action id="603" library="1">
<!--action name: Code-->
@@ -13,7 +13,7 @@
<not>false</not>
<appliesTo>.self</appliesTo>
<arguments>
- <argument kind="STRING">characterHitObstacle();
+ <argument kind="STRING">charUnsetSolids();
</argument>
</arguments>
</action>
View
2  ...jects/Map elements/Obstacles/Obstacle.xml → ...elements/Colliders/Obstacles/Obstacle.xml
@@ -5,6 +5,6 @@
<visible>false</visible>
<depth>0</depth>
<persistent>false</persistent>
- <parent/>
+ <parent>CharacterCollider</parent>
<mask/>
</object>
View
0  ...ts/Map elements/Obstacles/ObstacleSml.xml → ...ments/Colliders/Obstacles/ObstacleSml.xml
File renamed without changes
View
0  ...s/Map elements/Obstacles/WideObstacle.xml → ...ents/Colliders/Obstacles/WideObstacle.xml
File renamed without changes
View
0  ...ap elements/Obstacles/WideObstacleSml.xml → ...s/Colliders/Obstacles/WideObstacleSml.xml
File renamed without changes
View
0  ...ap elements/Obstacles/_resources.list.xml → ...s/Colliders/Obstacles/_resources.list.xml
File renamed without changes
View
6 Source/gg2/Objects/Map elements/Colliders/_resources.list.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<resources>
+ <resource name="Obstacles" type="GROUP"/>
+ <resource filename="Gates_Doors" name="Gates/Doors" type="GROUP"/>
+ <resource name="CharacterCollider" type="RESOURCE"/>
+</resources>
View
3  Source/gg2/Objects/Map elements/_resources.list.xml
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resources>
- <resource name="Obstacles" type="GROUP"/>
<resource name="Gamemode-specific" type="GROUP"/>
<resource name="Unused" type="GROUP"/>
<resource name="Spawnroom objects" type="GROUP"/>
<resource name="Player Influencing" type="GROUP"/>
- <resource filename="Gates_Doors" name="Gates/Doors" type="GROUP"/>
+ <resource name="Colliders" type="GROUP"/>
<resource name="NextAreaO" type="RESOURCE"/>
<resource name="PreviousAreaO" type="RESOURCE"/>
</resources>
View
0  ...jects/Overlays/ArenaHUD.events/Create.xml → ...lays/Gamemodes/ArenaHUD.events/Create.xml
File renamed without changes
View
0  ...Objects/Overlays/ArenaHUD.events/Draw.xml → ...erlays/Gamemodes/ArenaHUD.events/Draw.xml
File renamed without changes
View
0  ...Objects/Overlays/ArenaHUD.events/Step.xml → ...erlays/Gamemodes/ArenaHUD.events/Step.xml
File renamed without changes
View
0  ...verlays/ArenaHUD.events/User Event 12.xml → ...memodes/ArenaHUD.events/User Event 12.xml
File renamed without changes
View
0  ...verlays/ArenaHUD.events/User Event 13.xml → ...memodes/ArenaHUD.events/User Event 13.xml
File renamed without changes
View
2  Source/gg2/Objects/Overlays/ArenaHUD.xml → ...2/Objects/Overlays/Gamemodes/ArenaHUD.xml
@@ -5,6 +5,6 @@
<visible>true</visible>
<depth>-120000</depth>
<persistent>false</persistent>
- <parent>HUD</parent>
+ <parent>FauxCPHUD</parent>
<mask/>
</object>
View
0  ...verlays/ControlPointHUD.events/Create.xml → ...memodes/ControlPointHUD.events/Create.xml
File renamed without changes
View
0  .../Overlays/ControlPointHUD.events/Draw.xml → ...Gamemodes/ControlPointHUD.events/Draw.xml
File renamed without changes
View
0  .../Overlays/ControlPointHUD.events/Step.xml → ...Gamemodes/ControlPointHUD.events/Step.xml
File renamed without changes
View
0  .../ControlPointHUD.events/User Event 12.xml → .../ControlPointHUD.events/User Event 12.xml
File renamed without changes
View
0  .../ControlPointHUD.events/User Event 13.xml → .../ControlPointHUD.events/User Event 13.xml
File renamed without changes
View
0  .../gg2/Objects/Overlays/ControlPointHUD.xml → ...ts/Overlays/Gamemodes/ControlPointHUD.xml
File renamed without changes
View
0  ...jects/Overlays/DKothHUD.events/Create.xml → ...lays/Gamemodes/DKothHUD.events/Create.xml
File renamed without changes
View
0  ...Objects/Overlays/DKothHUD.events/Draw.xml → ...erlays/Gamemodes/DKothHUD.events/Draw.xml
File renamed without changes
View
0  ...Objects/Overlays/DKothHUD.events/Step.xml → ...erlays/Gamemodes/DKothHUD.events/Step.xml
File renamed without changes
View
0  ...verlays/DKothHUD.events/User Event 12.xml → ...memodes/DKothHUD.events/User Event 12.xml
File renamed without changes
View
0  ...verlays/DKothHUD.events/User Event 13.xml → ...memodes/DKothHUD.events/User Event 13.xml
File renamed without changes
View
2  Source/gg2/Objects/Overlays/DKothHUD.xml → ...2/Objects/Overlays/Gamemodes/DKothHUD.xml
@@ -5,6 +5,6 @@
<visible>true</visible>
<depth>-120000</depth>
<persistent>false</persistent>
- <parent>HUD</parent>
+ <parent>FauxCPHUD</parent>
<mask/>
</object>
View
10 Source/gg2/Objects/Overlays/Gamemodes/FauxCPHUD.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<object id="812">
+ <sprite/>
+ <solid>false</solid>
+ <visible>true</visible>
+ <depth>0</depth>
+ <persistent>false</persistent>
+ <parent>HUD</parent>
+ <mask/>
+</object>
View
0  ...s/Overlays/GeneratorHUD.events/Create.xml → .../Gamemodes/GeneratorHUD.events/Create.xml
File renamed without changes
View
0  ...cts/Overlays/GeneratorHUD.events/Draw.xml → ...ys/Gamemodes/GeneratorHUD.events/Draw.xml
File renamed without changes
View
0  ...cts/Overlays/GeneratorHUD.events/Step.xml → ...ys/Gamemodes/GeneratorHUD.events/Step.xml
File renamed without changes
View
0  ...ays/GeneratorHUD.events/User Event 12.xml → ...des/GeneratorHUD.events/User Event 12.xml
File renamed without changes
View
0  ...ays/GeneratorHUD.events/User Event 13.xml → ...des/GeneratorHUD.events/User Event 13.xml
File renamed without changes
View
0  Source/gg2/Objects/Overlays/GeneratorHUD.xml → ...jects/Overlays/Gamemodes/GeneratorHUD.xml
File renamed without changes
View
0  ...bjects/Overlays/KothHUD.events/Create.xml → ...rlays/Gamemodes/KothHUD.events/Create.xml
File renamed without changes
View
0  .../Objects/Overlays/KothHUD.events/Draw.xml → ...verlays/Gamemodes/KothHUD.events/Draw.xml
File renamed without changes
View
0  .../Objects/Overlays/KothHUD.events/Step.xml → ...verlays/Gamemodes/KothHUD.events/Step.xml
File renamed without changes
View
0  ...Overlays/KothHUD.events/User Event 12.xml → ...amemodes/KothHUD.events/User Event 12.xml
File renamed without changes
View
0  ...Overlays/KothHUD.events/User Event 13.xml → ...amemodes/KothHUD.events/User Event 13.xml
File renamed without changes
View
2  Source/gg2/Objects/Overlays/KothHUD.xml → ...g2/Objects/Overlays/Gamemodes/KothHUD.xml
@@ -5,6 +5,6 @@
<visible>true</visible>
<depth>-120000</depth>
<persistent>false</persistent>
- <parent>HUD</parent>
+ <parent>FauxCPHUD</parent>
<mask/>
</object>
View
0  ...cts/Overlays/ScorePanel.events/Create.xml → ...ys/Gamemodes/ScorePanel.events/Create.xml
File renamed without changes
View
0  ...jects/Overlays/ScorePanel.events/Draw.xml → ...lays/Gamemodes/ScorePanel.events/Draw.xml
File renamed without changes
View
0  ...jects/Overlays/ScorePanel.events/Step.xml → ...lays/Gamemodes/ScorePanel.events/Step.xml
File renamed without changes
View
0  ...rlays/ScorePanel.events/User Event 12.xml → ...modes/ScorePanel.events/User Event 12.xml
File renamed without changes
View
0  ...rlays/ScorePanel.events/User Event 13.xml → ...modes/ScorePanel.events/User Event 13.xml
File renamed without changes
View
0  Source/gg2/Objects/Overlays/ScorePanel.xml → ...Objects/Overlays/Gamemodes/ScorePanel.xml
File renamed without changes
View
10 Source/gg2/Objects/Overlays/Gamemodes/_resources.list.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<resources>
+ <resource name="ScorePanel" type="RESOURCE"/>
+ <resource name="ControlPointHUD" type="RESOURCE"/>
+ <resource name="FauxCPHUD" type="RESOURCE"/>
+ <resource name="ArenaHUD" type="RESOURCE"/>
+ <resource name="KothHUD" type="RESOURCE"/>
+ <resource name="GeneratorHUD" type="RESOURCE"/>
+ <resource name="DKothHUD" type="RESOURCE"/>
+</resources>
View
7 Source/gg2/Objects/Overlays/_resources.list.xml
@@ -1,16 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resources>
<resource name="ClassPortraitAnimations" type="GROUP"/>
+ <resource name="Gamemodes" type="GROUP"/>
<resource name="TeamSelectController" type="RESOURCE"/>
<resource name="ClassSelectController" type="RESOURCE"/>
<resource name="ScoreTableController" type="RESOURCE"/>
<resource name="HUD" type="RESOURCE"/>
- <resource name="ScorePanel" type="RESOURCE"/>
- <resource name="ControlPointHUD" type="RESOURCE"/>
- <resource name="ArenaHUD" type="RESOURCE"/>
- <resource name="KothHUD" type="RESOURCE"/>
- <resource name="DKothHUD" type="RESOURCE"/>
- <resource name="GeneratorHUD" type="RESOURCE"/>
<resource name="KillLog" type="RESOURCE"/>
<resource name="BubbleMenuZ" type="RESOURCE"/>
<resource name="RespawnTimer" type="RESOURCE"/>
View
3  Source/gg2/Scripts/Macro/_resources.list.xml
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resources>
<resource name="createGib" type="RESOURCE"/>
+ <resource name="charSetSolids" type="RESOURCE"/>
+ <resource name="charSetAllSolids" type="RESOURCE"/>
+ <resource name="charUnsetSolids" type="RESOURCE"/>
</resources>
View
9 Source/gg2/Scripts/Macro/charSetAllSolids.gml
@@ -0,0 +1,9 @@
+with(IntelGate)
+ solid = true;
+with(TeamGate)
+ solid = true;
+with(ControlPointSetupGate)
+ solid = true;
+with(PlayerWall)
+ solid = true;
+
View
13 Source/gg2/Scripts/Macro/charSetSolids.gml
@@ -0,0 +1,13 @@
+with(IntelGate)
+ solid = (team != other.team and other.intel and !global.mapchanging);
+with(TeamGate)
+ solid = ((team != other.team or other.intel) and !global.mapchanging);
+with(ControlPointSetupGate)
+{
+ solid = (global.setupTimer > 0);
+ if(instance_exists(FauxCPHUD))
+ solid = (FauxCPHUD.cpUnlock > 0);
+}
+with(PlayerWall)
+ solid = true;
+
View
7 Source/gg2/Scripts/Macro/charUnsetSolids.gml
@@ -0,0 +1,7 @@
+with(Gate)
+ solid = false;
+with(ControlPointSetupGate)
+ solid = false;
+with(PlayerWall)
+ solid = false;
+
View
2  Source/gg2/Scripts/_resources.list.xml
@@ -45,6 +45,8 @@
<resource name="parseUuid" type="RESOURCE"/>
<resource name="pointCapture" type="RESOURCE"/>
<resource name="selectSpawnGroup" type="RESOURCE"/>
+ <resource name="charFixFringes" type="RESOURCE"/>
+ <resource name="charRunPhysics" type="RESOURCE"/>
<resource name="characterHitObstacle" type="RESOURCE"/>
<resource name="calculateHealingFactor" type="RESOURCE"/>
<resource name="toggleZoom" type="RESOURCE"/>
View
45 Source/gg2/Scripts/charFixFringes.gml
@@ -0,0 +1,45 @@
+// Sets character speed depending on solidity of its immediate surrounding area.
+// I forgot why this does each exact thing, but it's an important rectification.
+var slopesize;
+slopesize = 6;
+
+if ((iterspace-spent) == 0)
+ break;
+
+temp = (iterspace-spent)/ceil((iterspace-spent));
+
+htest = cos(degtorad(direction))*temp;
+vtest = -sin(degtorad(direction))*temp;
+
+if(!place_free(x+htest, y) and !place_free(x+htest, y-slopesize) and !place_free(x+htest, y+slopesize))
+{
+ hspeed = 0;
+ oldspace = iterspace;
+ iterspace = point_distance(oldx_move, 0, x, olddy);
+ x = round(x);
+}
+if(!place_free(x, y+sign(vspeed)))
+{
+ vspeed = 0;
+ oldspace = iterspace;
+ iterspace = point_distance(0, oldy_move, olddx, y);
+ y = round(y);
+}
+if(!place_free(x+htest, y+vtest) and !place_free(x+htest, y-slopesize) and !place_free(x+htest, y+slopesize))
+{
+ if(place_free(x+htest, y))
+ {
+ vspeed = 0;
+ oldspace = iterspace;
+ iterspace = point_distance(0, oldy_move, olddx, y);
+ y = round(y);
+ }
+ else
+ {
+ hspeed = 0;
+ oldspace = iterspace;
+ iterspace = point_distance(oldx_move, 0, x, olddy);
+ x = round(x);
+ }
+}
+
View
119 Source/gg2/Scripts/charRunPhysics.gml
@@ -0,0 +1,119 @@
+// Moves the character which calls it, accounting for solid objects and physics.
+
+slopesize = 6;
+slopespent = 0;
+iters = ceil(speed);
+iterspace = speed;
+spent = 0;
+olddx = hspeed;
+olddy = vspeed;
+olddir = direction;
+oldx_move = x;
+oldy_move = y;
+
+if(speed < 0.195)
+ status = "still";
+
+while(spent < iterspace and iterspace != 0 and speed != 0)
+{
+ itersize = (iterspace-spent)/ceil((iterspace-spent));
+
+ xd = cos(degtorad(direction))*itersize;
+ yd = -sin(degtorad(direction))*itersize;
+
+ if(place_free(x+xd, y+yd))
+ {
+ // walk down slopes
+ if( place_free(x+xd, y+1)
+ and !place_free(x, y+1)
+ and !place_free(x+xd, y+slopesize+1)
+ and vspeed >= 0)
+ {
+ status = "downslope";
+ x += xd;
+ y += slopesize;
+ slopespent += slopesize;
+ spent += abs(xd);
+
+ vspeed = 0;
+ y = round(y);
+ charFixFringes();
+ }
+ // purely in air
+ else
+ {
+ status = "air";
+ x += xd;
+ y += yd;
+ charFixFringes();
+ spent += itersize;
+ }
+ }
+ else // place_free(x+xd, y+yd) false
+ {
+ // normal up-slope
+ if(place_free(x+xd, y-slopesize))
+ {
+ status = "slope";
+ x += xd;
+ y -= slopesize;
+ slopespent -= slopesize;
+ spent += abs(xd);
+
+ vspeed = min(0, vspeed);
+ y = round(y);
+ charFixFringes();
+ }
+ // slope down sloped ceilings
+ else if(place_free(x+xd, y+slopesize))
+ {
+ status = "ceilslope";
+ x += xd;
+ y += slopesize;
+ slopespent += slopesize;
+ spent += abs(xd);
+
+ vspeed = max(0, vspeed);
+ y = round(y);
+ charFixFringes();
+ }
+ // ceiling/floor (apparently)
+ else if(place_free(x+xd, y))
+ {
+ status = "ceil";
+ x += xd;
+ spent += abs(xd);
+
+ vspeed = 0;
+ charFixFringes();
+
+ y = round(y);
+ }
+ // wall (apparently)
+ else if(place_free(x, y+yd))
+ {
+ status = "wall";
+ y += yd;
+ spent += abs(yd);
+
+ hspeed = 0;
+ charFixFringes();
+
+ x = round(x);
+ }
+ // inside of obstacle (from what we can tell)
+ else
+ {
+ status = "stuck";
+ x = round(x);
+ y = round(y);
+ speed = 0;
+ charFixFringes();
+ }
+ }
+}
+
+// Set these backwards before the game runs step
+x -= hspeed;
+y -= vspeed;
+
Something went wrong with that request. Please try again.