View Issue Details

IDProjectCategoryView StatusLast Update
0002307Spring engineLuapublic2011-01-18 15:43
Reporteruser744Assigned TojK  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.82.7.1 
Summary0002307: GetPlayerInfo should return playername instead of place holder (in synced code)
Descriptionhttp://springrts.com/wiki/Lua_SyncedRead
Spring.GetPlayerInfo
 ( number playerID ) ->
   nil | string "name", (in synced code this is "SYNCED_NONAME"!)
...
...


Why is GetPlayerInfo not allowed to return a players name in synced code?
It always returns "SYNCED_NONAME"

In #lua there were two theories:
1) cheating
[21:55] abma_irc so you can't do something like "if name = myname then give 10 krogoth"
If a game maker wants to have an advantage at his own game, so be it?
Would be easy to find other ways anyway.

2) desync
dont know about that could cause desyncs, it is not possible to only locally change playernames or w/e?

Imo they are lots of reasons why you would want playernames in synced code and not just in unsynced so this would be nice to have.
Yes, it is possible to work around this block (like send player id to unsynced, get player name, send it back to sync) but thats not nice.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

user744

2011-01-17 22:53

  ~0006263

Last edited: 2011-01-18 00:25

inb4 oolol dont need that:
First of, the function is there, so it should work unless there is a reason why that is not possible.

Second, what would be better:
1) displaymessage (playername .. " did something with " .. playername2)

2) displaymessage (playerid, " did something with " , playerid2)

3) displaymessage ("%playerid% did something with %playerid2%")

To me it appears that 1) is cleaner and more flexible than the other workarounds because it does not require parsing to replace the %playerid% with the real playername.

SirMaverick

2011-01-17 23:13

reporter   ~0006265

for second: send info with playerid using sendtounsync to unsync and let unsync gadget display the information - this way you can also filter for allies etc. (done so in CA/ZK)

user744

2011-01-17 23:22

  ~0006266

thanks but i know how 2) would work, my point is that such a workaround should not be needed.
By that definition unitnames like "Rocko Rocketbot" should not be available in sync as well, the internal "armrock" would be enough.

user744

2011-01-18 00:34

  ~0006267

appearently cheat protection is really the reason...?
Please think about if that is really helping anything, imo this offers minimal protection at best.
See Kernel Panic's fairy faction for a "cheat" that works without playernames.
Or a game could broadcast the positions of all units on the map but only the cheater has the widget to recieve & draw the unit positions. That would be a maphack.

Issue History

Date Modified Username Field Change
2011-01-17 22:28 user744 New Issue
2011-01-17 22:53 user744 Note Added: 0006263
2011-01-17 23:13 SirMaverick Note Added: 0006265
2011-01-17 23:22 user744 Note Added: 0006266
2011-01-18 00:25 user744 Note Edited: 0006263
2011-01-18 00:34 user744 Note Added: 0006267
2011-01-18 15:43 jK Status new => resolved
2011-01-18 15:43 jK Resolution open => fixed
2011-01-18 15:43 jK Assigned To => jK