Skip to content

feat: game_ui#216

Merged
xen-000 merged 9 commits intoSource2ZE:mainfrom
Kxnrl:feat-gameui
Apr 18, 2024
Merged

feat: game_ui#216
xen-000 merged 9 commits intoSource2ZE:mainfrom
Kxnrl:feat-gameui

Conversation

@Kxnrl
Copy link
Copy Markdown
Collaborator

@Kxnrl Kxnrl commented Apr 18, 2024

backport from ModSharp.
need more tests.

FGD here
DOC here
Example here

game_ui

create logic_case entity, then add kv

  • key vscripts | value game_ui

outputs

activator = player
caller = logic_case
PlayerOn/PlayerOff only be fired OnGameFramePost

spawnflags

  • 32 : Freeze Players
  • 256: Jump Deactivate

case branch

Output Case Name Comment
Case01 PlayerOn PlayerOn
Case02 PlayerOff PlayerOff
Case11 PressedForward Pressed 'W'
Case12 PressedMoveLeft Pressed 'A'
Case13 PressedBack Pressed 'S'
Case14 PressedMoveRight Pressed 'D'
Case15 PressedAttack Pressed 'Attack'
Case16 PressedAttack2 Pressed 'Attack2'
Case17 PressedSpeed Pressed 'Speed'
Case18 PressedDuck Pressed 'Duck'
Case21 UnpressedForward Unpressed 'W'
Case22 UnpressedMoveLeft Unpressed 'A'
Case23 UnpressedBack Unpressed 'S'
Case24 UnpressedMoveRight Unpressed 'D'
Case25 UnpressedAttack Unpressed 'Attack'
Case26 UnpressedAttack2 Unpressed 'Attack2'
Case27 UnpressedSpeed Unpressed 'Speed'
Case28 UnpressedDuck Unpressed 'Duck'

@Kxnrl Kxnrl marked this pull request as ready for review April 18, 2024 01:09
src/cs2fixes.cpp Outdated
Comment on lines +625 to +630
void CS2Fixes::Hook_GameFramePre(bool simulating, bool bFirstTick, bool bLastTick)
{
EntityHandler_OnGameFramePre(simulating, gpGlobals->tickcount);

RETURN_META(MRES_IGNORED);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to use Pre/Post EntityThink in gamesystem.cpp

@xen-000 xen-000 enabled auto-merge (squash) April 18, 2024 23:39
@xen-000 xen-000 merged commit 0f4a103 into Source2ZE:main Apr 18, 2024
@Kxnrl Kxnrl deleted the feat-gameui branch April 18, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants