mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 02:25:32 -04:00
Fix can't multijump anymore
This commit is contained in:
parent
071c6f68d5
commit
0f5c74fb53
@ -919,6 +919,7 @@ static cc_bool LocalPlayer_HandleJump(int key, struct InputDevice* device) {
|
|||||||
struct HacksComp* hacks = &p->Hacks;
|
struct HacksComp* hacks = &p->Hacks;
|
||||||
struct PhysicsComp* physics = &p->Physics;
|
struct PhysicsComp* physics = &p->Physics;
|
||||||
int maxJumps;
|
int maxJumps;
|
||||||
|
physics->Jumping = true;
|
||||||
|
|
||||||
if (!p->Base.OnGround && !(hacks->Flying || hacks->Noclip)) {
|
if (!p->Base.OnGround && !(hacks->Flying || hacks->Noclip)) {
|
||||||
maxJumps = hacks->CanDoubleJump && hacks->WOMStyleHacks ? 2 : 0;
|
maxJumps = hacks->CanDoubleJump && hacks->WOMStyleHacks ? 2 : 0;
|
||||||
@ -981,11 +982,6 @@ static void LocalPlayer_ReleaseFlyDown(int key, struct InputDevice* device) {
|
|||||||
LocalPlayer_Instances[device->mappedIndex].Hacks.FlyingDown = false;
|
LocalPlayer_Instances[device->mappedIndex].Hacks.FlyingDown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static cc_bool LocalPlayer_TriggerJump(int key, struct InputDevice* device) {
|
|
||||||
LocalPlayer_Instances[device->mappedIndex].Physics.Jumping = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
static void LocalPlayer_ReleaseJump(int key, struct InputDevice* device) {
|
static void LocalPlayer_ReleaseJump(int key, struct InputDevice* device) {
|
||||||
LocalPlayer_Instances[device->mappedIndex].Physics.Jumping = false;
|
LocalPlayer_Instances[device->mappedIndex].Physics.Jumping = false;
|
||||||
}
|
}
|
||||||
@ -1011,7 +1007,6 @@ static void LocalPlayer_HookBinds(void) {
|
|||||||
Bind_OnReleased[BIND_FLY_UP] = LocalPlayer_ReleaseFlyUp;
|
Bind_OnReleased[BIND_FLY_UP] = LocalPlayer_ReleaseFlyUp;
|
||||||
Bind_OnReleased[BIND_FLY_DOWN] = LocalPlayer_ReleaseFlyDown;
|
Bind_OnReleased[BIND_FLY_DOWN] = LocalPlayer_ReleaseFlyDown;
|
||||||
|
|
||||||
Bind_OnTriggered[BIND_JUMP] = LocalPlayer_TriggerJump;
|
|
||||||
Bind_OnReleased[BIND_JUMP] = LocalPlayer_ReleaseJump;
|
Bind_OnReleased[BIND_JUMP] = LocalPlayer_ReleaseJump;
|
||||||
Bind_OnReleased[BIND_NOCLIP] = LocalPlayer_ReleaseNoclip;
|
Bind_OnReleased[BIND_NOCLIP] = LocalPlayer_ReleaseNoclip;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user