Skip to content

Commit fe42840

Browse files
committed
Fix old sqrt() call in Bunnyhop
1 parent a1c4f17 commit fe42840

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

bunnyhop.gsc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include std\player;
2-
#include std\math;
3-
41
bunnyhop()
52
{
63
self thread bunnyhop_brutzel();
@@ -76,7 +73,7 @@ bunnyhop_brutzel()
7673
//smax = getcvarint("jump_height");
7774
smax = 20;
7875
a = getcvarint("g_gravity");
79-
vzero = std\math::sqrt(smax * a * 2);
76+
vzero = sqrt(smax * a * 2);
8077

8178
for(;;)
8279
{
@@ -103,7 +100,7 @@ bunnyhop_brutzel()
103100
if (PlayerSpeed < 300)
104101
{
105102
PlayerSpeed = 300;
106-
PlayerVel = vectorScale(vectorNormalize(PlayerVel), PlayerSpeed);
103+
PlayerVel = std\math::vectorScale(vectorNormalize(PlayerVel), PlayerSpeed);
107104
}
108105
//iprintlnbold(PlayerSpeed);
109106

surf.gsc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include std\player;
2-
31
/*
42
TODO
53
- player just jumps-off sometimes in some unexpected direction

0 commit comments

Comments
 (0)