Skip to content

Commit

Permalink
Gravity trigger works again
Browse files Browse the repository at this point in the history
  • Loading branch information
GameChaos committed Oct 29, 2024
1 parent 35f6538 commit 9a35b5b
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/kz/trigger/kz_trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ void KZTriggerService::OnProcessMovementPost()
this->ResetBhopState();
}

// reset gravity before touching triggers
this->player->GetPlayerPawn()->m_flGravityScale(1);
this->antiBhopActive = false;
}

Expand Down Expand Up @@ -140,6 +138,9 @@ void KZTriggerService::TouchTriggersAlongPath(const Vector &start, const Vector

void KZTriggerService::UpdateTriggerTouchList()
{
// reset gravity before all the Touch() calls
this->player->GetPlayerPawn()->m_flGravityScale(1);

if (!this->player->IsAlive() || this->player->GetCollisionGroup() != KZ_COLLISION_GROUP_STANDARD)
{
this->EndTouchAll();
Expand Down Expand Up @@ -295,20 +296,7 @@ bool KZTriggerService::IsManagedByTriggerService(CBaseEntity *toucher, CBaseEnti

bool KZTriggerService::HighFrequencyTouchAllowed(TriggerTouchTracker tracker)
{
if (!tracker.kzTrigger)
{
return false;
}
switch (tracker.kzTrigger->type)
{
case KZTRIGGER_ANTI_BHOP:
case KZTRIGGER_TELEPORT:
case KZTRIGGER_MULTI_BHOP:
case KZTRIGGER_SINGLE_BHOP:
case KZTRIGGER_SEQUENTIAL_BHOP:
return true;
}
return false;
return tracker.kzTrigger;
}

KZTriggerService::TriggerTouchTracker *KZTriggerService::GetTriggerTracker(CBaseTrigger *trigger)
Expand Down

0 comments on commit 9a35b5b

Please sign in to comment.