MantisBT - Zandronum
View Issue Details
0001934Zandronum[All Projects] Bugpublic2014-09-14 01:012014-09-20 21:10
Catastrophe 
 
normalminoralways
closedduplicate 
MicrosoftWindowsXP/Vista/7
1.2 
 
0001934: GetPlayerInput does not work properly with spectators offline
With the account system coming up I need getplayerinput to work with spectators through a clientsided script.

For example, my mod has a purchase menu, but it is for last man standing only. So if you want to buy something you'd have to wait the full five minutes for a game to end, so it gets rather tedious.

Plus, if I did implement a way for the menu to work while in-game, it would lead me to keep players invulnerable so they don't die while using the menu. Problem with this is that if I keep a player invulnerable, it could get abused and lead to matches getting stalled forever.

Adding a weaponless area for purchasing items, but I want to keep this mod compatible with other mappacks. Adding a map just for buying items could work, but then people wanting to buy stuff would have to wait ages until the map rotation enters the map.

tl;dr let me use getplayerinput on a spectator using a clientsided script so I can make a purchase menu without disrupting a game.
No tags attached.
duplicate of 0001656resolved  CLIENTSIDE GetPlayerInput to work the same on- and offline 
? inputtest.pk3 (854) 2014-09-14 17:00
/tracker/file_download.php?file_id=1289&type=bug
Issue History
2014-09-14 01:01CatastropheNew Issue
2014-09-14 05:57ZzZomboNote Added: 0010263
2014-09-14 17:00CatastropheNote Added: 0010264
2014-09-14 17:00CatastropheFile Added: inputtest.pk3
2014-09-14 17:02CatastropheNote Edited: 0010264bug_revision_view_page.php?bugnote_id=10264#r5564
2014-09-14 18:02QentNote Added: 0010265
2014-09-14 18:27CatastropheNote Added: 0010266
2014-09-14 18:29QentStatusnew => closed
2014-09-14 18:29QentResolutionopen => no change required
2014-09-14 20:58DuskAssigned To => Dusk
2014-09-14 20:58DuskNote Added: 0010267
2014-09-14 20:58DuskStatusclosed => feedback
2014-09-14 20:58DuskResolutionno change required => reopened
2014-09-14 20:59DuskStatusfeedback => acknowledged
2014-09-14 20:59DuskCategorySuggestion => Bug
2014-09-14 20:59DuskSummaryAllow getplayerinput to work with spectators. => GetPlayerInput does not work properly with spectators offline
2014-09-14 21:00DuskSeveritytweak => minor
2014-09-14 21:00DuskReproducibilityN/A => always
2014-09-14 21:00DuskStatusacknowledged => confirmed
2014-09-14 21:22LeonardNote Added: 0010268
2014-09-20 21:10DuskNote Added: 0010279
2014-09-20 21:10DuskStatusconfirmed => closed
2014-09-20 21:10DuskAssigned ToDusk =>
2014-09-20 21:10DuskResolutionreopened => duplicate
2014-09-20 21:10DuskRelationship addedduplicate of 0001656

Notes
(0010263)
ZzZombo   
2014-09-14 05:57   
It already should work for spectators.
(0010264)
Catastrophe   
2014-09-14 17:00   
(edited on: 2014-09-14 17:02)
No, it doesn't. See the attached file. Puke 10 as a spectator and try moving, then do the same thing as a player and you'll see what's wrong.

(0010265)
Qent   
2014-09-14 18:02   
To use GetPlayerInput in a clientside script, set the activator to the world and use -1 as the player number.
(0010266)
Catastrophe   
2014-09-14 18:27   
<Catastrophe> like this?
<Catastrophe> setactivator(-1);
<Catastrophe> buttons = GetPlayerInput (-1, INPUT_BUTTONS);
<Qent> yep
<Catastrophe> doesnt work in sp
<Qent> yeah that's a problem
<Qent> in singleplayer you have to use PlayerNumber i think
<Catastrophe> that is gay.
<Qent>'https://zandronum.com/tracker/view.php?id=1656 [^]'
<Qent> yeah it is :/
<Qent> *ConsolePlayerNumber, not PlayerNumber
<Catastrophe> yep works online if I do this
<Catastrophe> Sigh, so the acs has to be different to test offline... Great.
<Qent> ok great, i'll close the ticket


I guess you can close, though I'd prefer if this inconsistency got fixed.
(0010267)
Dusk   
2014-09-14 20:58   
Reopened. There's a clear bug here.
(0010268)
Leonard   
2014-09-14 21:22   
In this case isn't it duplicate of 1656?
(0010279)
Dusk   
2014-09-20 21:10   
You are right about that.