View Issue Details

IDProjectCategoryView StatusLast Update
0000471Gameplay + OpenGL[All Projects] Featurepublic2017-03-28 15:52
ReporterNash 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Summary0000471: Allow play classes to call Menu.SetMenu
DescriptionFrom this thread: https://forum.zdoom.org/viewtopic.php?p=986319#p986319

"It's generally blocked by the separation, but this function needs to be 'clearscope' so that the game can open menus."
TagsNo tags attached.

Relationships

Activities

ZZYZX

ZZYZX

2017-03-23 18:11

reporter   ~0001089

Last edited: 2017-03-23 18:17

View 3 revisions

Marking it clearscope here would mean that in a networked game, one player would press use on an actor and BOOM the menu will open for everyone, because playsim is synchronized and that method will run for everyone.

IMO there needs to be reverse SendNetworkEvent that can send some UI event to a specific player from the playsim.

Alternatively it can be marked clearscope but then modders will have to remember that they need to do if (players[consoleplayer] == player) before they open the menu.
I actually like this approach more because SendNetworkEvent is the only good name for any networked things and it's already taken for client input.

Graf Zahl

Graf Zahl

2017-03-23 18:33

administrator   ~0001090

I think the best approach is to check inside the function if it got called by the consoleplayer and not do anything when some other player tries to open a menu.
Graf Zahl

Graf Zahl

2017-03-28 15:52

administrator   ~0001147

I just added clearscope. This is one of those cases where the feature is more important than perfect security.

Issue History

Date Modified Username Field Change
2017-03-23 17:57 Nash New Issue
2017-03-23 18:11 ZZYZX Note Added: 0001089
2017-03-23 18:12 ZZYZX Note Edited: 0001089 View Revisions
2017-03-23 18:17 ZZYZX Note Edited: 0001089 View Revisions
2017-03-23 18:33 Graf Zahl Note Added: 0001090
2017-03-28 15:52 Graf Zahl Note Added: 0001147
2017-03-28 15:52 Graf Zahl Status new => resolved
2017-03-28 15:52 Graf Zahl Resolution open => fixed