OpenArena Message Boards

OpenArena Contributions => Idea pit => Topic started by: wing0 on March 13, 2015, 08:48:05 am



Title: wing's ideas
Post by: wing0 on March 13, 2015, 08:48:05 am
1)
I would let people know if a vote passed that reloads the map.
I sometimes miss that moment and wonder why I end up on the loading screen.

2)
When no one returns the flag, after a timeout it returns.
For people that run external stats software and rely on log-data,
I would like to add that to the output. It is also nice if you have sound turned off or are deaf.


I have code for both propositions:
https://github.com/Livewingx/gamecode/tree/wing/code


Title: Re: wing's ideas
Post by: Gig on March 16, 2015, 03:03:16 am
What does 1) do exactly, for the user?

About code changes, maybe linking specified "diffs" for the two things may help Sago and/or Fromhell to identify that specific code, check it, and integrate it into game logic...


Title: Re: wing's ideas
Post by: wing0 on March 19, 2015, 06:58:10 pm
You are right, I should have post a diff too ... Here it is:
https://github.com/OpenArena/gamecode/compare/master...Livewingx:wing

1) It makes a centerprint (cp) which prints a message in the middle of the screen.
As for a map-restart everything is going to change anyway, this 2 second long centerprint is a good idea - at least in my oppinion.


Title: Re: wing's ideas
Post by: Gig on March 20, 2015, 03:33:45 am
I'm not used to OA coding, however I noticed a few things:
- There is a comment wich tells "FIXME..."...
- "Vote passed. More yes than no." and "Vote passed. At least 2 of 3 voted yes"... Those parts are not highlighted, so maybe they were already there... but I don't remember the game saying "more yes than no" or "At least 2 of 3 voted yes" when a vote ends... do I remember wrong? Note: I can guess the two different cases are triggered depending from "dmflags 512" set or not ("DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Dmflags#Light_voting]Light voting (http://([b)" on or off), right?[/size]


Title: Re: wing's ideas
Post by: wing0 on March 20, 2015, 06:26:27 am
Yes, that is a thing you can set in the config called "light vote" +100points to you!

The comment is just a comment.
It is meant as a hint.
The array for the guids is overwritten dependent of when they were first written.
Sookee, one of zimmer's insta server staff pointed out that he occasionally had corrupted guids for his stats.
He wrote a custom stats tool that is based on guids rather than names (which are not necessarily unique - e.g. Unnamedplayer).
My guess on what went wrong is this:
You have a game of let us say 20 minutes with player A and 11 other guys. People come and go. Their guids are being stored.
As soon as there are more than 20 people connecting and disconnecting in those 20 minutes, this system is going to overwrite player A's guid (and with each new connecter a further guid).

Edit:
Overwriting guids is ok, I guess, but we do not want to overwrite guids of people still on the server e.g. player A's guid



Title: Re: wing's ideas
Post by: Gig on March 20, 2015, 07:02:54 am
Yes, that is a thing you can set in the config called "light vote" +100points to you!
I was wondering... in which case the game would write also the second phrase and not just "vote passed"?

Yes, I'm going very OT. Sorry, I'm just curious.


Title: Re: wing's ideas
Post by: sago007 on March 20, 2015, 10:20:04 am
Overwriting guids is ok, I guess, but we do not want to overwrite guids of people still on the server e.g. player A's guid
It should not matter.
Guis are written to the store if the player leaves the game for the sole purpose of restoring the score if he returns. Once the player is on the server it does not matter if he is in the playerstore or not.
At least that was my idea. It may be trouble some for spectators because they are located in the playerstore too. So if you are spectating for a long time you may loose your state.


Title: Re: wing's ideas
Post by: wing0 on March 21, 2015, 10:27:15 am
Upon further review of the code I figured out that the playerstore is not where the guids are drawn from, but guids are only the key to something that is vague vague vaguely a hashmap/dictionary.

I will go on to hunt down the bug that has been reported to me by sookee.

I enjoyed talking about code with you, although it all started with just a comment.
However the lesson I learned is that I should write comments that are not only a hint to me, but to others too.

Thanks - I will keep you informed :)