[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Bug fix - Framerate-independent Damage and Bonus shifts

Bug fix - Framerate-independent Damage and Bonus shifts

Post tutorials on how to do certain tasks within game or engine code here.

Moderator: InsideQC Admins

Bug fix - Framerate-independent Damage and Bonus shifts

Postby mh » Wed Jun 06, 2012 12:11 am

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby taniwha » Mon Jun 11, 2012 11:22 pm

I've implemented this too in qf. Still can't push :(

I couldn't see any difference, but qf is still locked to 72fps and thus might not cause as much trouble. But then, not seeing any difference might be a good thing: I didn't break anything in the process :)
Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby Spike » Mon Jun 11, 2012 11:42 pm

my concern with this is that stuffcmd(player, "bf\nbf\n") no longer results in brigher bfs. most noticable when picking up lots of items near each other.
personally I find just using a float instead of an int in the cshift_t struct works sufficiently well. Sure, there might be minor precision issues, but there are identical minor precision issues all over the quake engine that it doesn't really matter, so long as the value tends towards 0 instead of infinity.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby mh » Tue Jun 12, 2012 12:41 am

Hmmm - I don't see multiple subsequent bfs having that effect in ID Quake either.

In fact V_BonusFlash_f explicitly sets the colours and percent rather than accumulating them, so a new bf will just put them back to the starting values and won't make them brighter (otherwise they would be +=, not =).

Another silly bug with the original code is that the colours will still fade even if the client is paused. Even if nothing else they should use cl.time - cl.oldtime and not host_frametime.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby r00k » Tue Jun 12, 2012 8:50 am

Hmm, I can not replicate this bug. Ive set maxfps 72 -> 200 -> 500, with b bound to "bf" and spam it and it doesnt seem to fade slower/faster. I do notice vid_vsync 0 causes a screen tear but, thats normal.
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby mh » Fri Feb 22, 2013 9:55 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby revelator » Mon Apr 10, 2017 12:24 am

Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby Spike » Mon Apr 10, 2017 4:24 am

most compilers don't care if you leave trailing fields uninitialised inside structs.
some warn, because they're overly paranoid (gcc with -Wextra or -Wmissing-field-initializers), but C does not require it.

content-based colour shifts do not fade, so the added initial/time fields are not used in this case iiuc. the bugfix is really just for bonus+damage shifts as these are the only two that actually drop the flash percentages over time.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby mh » Tue Apr 11, 2017 3:35 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby revelator » Wed Apr 12, 2017 12:14 am

All versions of gcc after 4.5 will throw this warning, can't say if correct or not but i doub't that if it was not that they would leave it in ?
since others before me have mentioned this behaviour.

Does make sense though gcc may becomming a bit to strict, atleast its not a compiler error yet :lol:
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby revelator » Wed Apr 12, 2017 12:31 am

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119

ancient bug it seems, still not fixed because the patch that was proposed needs further work.

also seems to be a problem because newer versions of gcc actually use the c++ compiler to do most C code, in fact after the first bootstrap of a gcc build g++ takes over building the remaining passes.

Gah :evil:
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby revelator » Wed Apr 12, 2017 12:53 am

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21033

second one i ran into was excess elements in scalar initializer, seems this one stems back from the gcc-3 days yikes.

So a good guess is that it will newer be fixed cause the gcc devs see the warnings as a feature to tell developers to check there code for possible errors.

Sadly this warning cannot be turned off.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Bug fix - Framerate-independent Damage and Bonus shifts

Postby revelator » Sun Apr 16, 2017 9:58 am

Omg and it's totally random when this turns up, i just tried this tutorial on another engine and hello ? no warnings :shock:
but in another one -> joequake it also throws this. No adverse effects anyway so id flags this as a gcc fuckup of major dimensions but good luck getting them to fix it :lol:
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to Programming Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest