[odamex-bug-reporter] [Bug 1104] [PATCH] P_CanSpy fixes

  • From: odamex-bugtracker@xxxxxxxxxx
  • To: odamex-bug-reporter@xxxxxxxxxxxxx
  • Date: Thu, 20 Oct 2016 01:04:26 +0000

http://odamex.net/bugs/show_bug.cgi?id=1104

Alexander Mayfield <alexmax2742@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexmax2742@xxxxxxxxx

--- Comment #7 from Alexander Mayfield <alexmax2742@xxxxxxxxx> ---
Created attachment 547
  --> http://odamex.net/bugs/attachment.cgi?id=547&action=edit
AlexMax's attempt at fixeing spy functions

Here is my attempt at a patch on top of SVN r5506 that fixes SpyNext/SpyPrev
handling.

I think the problem was that P_CanSpy() did not consider the console player to
be an eligible player to be switched to.  I adjusted the function so that
viewers can always spy themselves, but I found the rest of the function hard to
parse, so I decided to rewrite as clean stack of if statements with comments,
along with adding a special third "demo" parameter that you can pass that gives
demo-watchers the same power as spectators.

I have tested a CTF netdemo, coop and CTF with this patch so far.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Other related posts: