-
Notifications
You must be signed in to change notification settings - Fork 19
New Minigame | Jackpot! #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Now instead of being seen from a point_viewcontrol, it is now seen from the viewmodel with a point_camera and vgui_screen for more immersion
| camera.AcceptInput("SetOn", "", null, null) | ||
| // workaround for networking bug | ||
| SetPropInt(camera, "m_nTransmitStateOwnedCounter", 1) | ||
| // needed for camera to get networked for everyone | ||
| local network_dummy = Ware_SpawnEntity("handle_dummy", | ||
| { | ||
| origin = cameraOrigin | ||
| }) | ||
| local camera_link = Ware_CreateEntity("info_camera_link") | ||
| SetPropEntity(camera_link, "m_hCamera", camera) | ||
| SetPropEntity(camera_link, "m_hTargetEntity", network_dummy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can someone tell me if this is really necessary and why?. I have put it more for fear of unexpected problems
| function SetJackpotViewModel(player) { | ||
| local viewmodel = GetPropEntity(player, "m_hViewModel") | ||
| if (viewmodel) | ||
| { | ||
| SetPropBool(player, "m_Local.m_bDrawViewmodel", false) | ||
|
|
||
| local pos = viewmodel.GetOrigin() | ||
| local ang = viewmodel.GetAbsAngles() | ||
| local screenSize = 24 | ||
|
|
||
| local offset = ang.Forward() * 8.0 | ||
| - ang.Up() * (screenSize / 2.0) | ||
| - ang.Left() * (screenSize / 2.0) | ||
| local angFacing = QAngle(-ang.Pitch(), ang.Yaw() + 180.0, ang.Roll()) | ||
|
|
||
| local screen = Ware_SpawnEntity("vgui_screen", | ||
| { | ||
| origin = pos + offset, | ||
| angles = angFacing, | ||
| panelname = "pda_panel_spy_invis", | ||
| overlaymaterial = material_tv, | ||
| width = screenSize, | ||
| height = screenSize | ||
| }) | ||
|
|
||
| SetEntityParent(screen, viewmodel) | ||
| } | ||
| else | ||
| { | ||
| Ware_PassPlayer(player, true) | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to center the vgui_screen on the viewmodel without it being seen differently in the other viewmodels?
|
If there are problems with this last change, just revert it ede7489 |
|
Good minigame breencast-2025-10-26_17.34.28.mp4 |
I already know about that issue, I still don’t have a solution, and if it can’t be fixed, I’ll just remove this feature.
This should be fixed now and look correct for people using cl_interp 0 as well as those using cl_interp 0.1 (Default) |
Renamed some variables for better clarity. Changed the way it checks for going out of bounds and when teleporting. Icons that don’t move now skip the check. Increased the timer duration to prevent visible teleportation. Moved the SlotMachine to better align with the icons so teleports aren’t visible. Many thanks to Rain for testing! Hopefully, it works properly now.
What the name says
Each player's unique perspective (same icons)