-
Notifications
You must be signed in to change notification settings - Fork 19
/
bugs.!!!
190 lines (168 loc) · 13.5 KB
/
bugs.!!!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
- a.bat, map tokyo, nosound 0, snd_restart -> crash with "cannot read file ... .wav"
- the file is corrupt, so should simply ignore it
- q3a map "mythology": has areas with very slow lighting (shoot from hyperblaster inside a long corrydor with disabled lightgrid ...
fps will fall to 15, 'ent light' will be 50ms)
- gl_light.cpp: when lightstyle #0 (any slow lightstyle?) changed, light from grid not changed; to fix should:
a) clear lightgrid
b) store into lightgrid light as style[0]==1.0, and rescale after GetCellLight()
- gl: tris2D not displayed for whole scene (currently - display info about 3D scene, when have 2D drawings)
- r_showBrush, r_surfInfo with brush display: brush can be moved (doors etc), but will be displayed in initial place
- when typing 'bind key var=value', it will be treated as 'bind key var'=value
- r_showBrush/r_surfInfo=8: often DropError() or not show brush (have error message on screen)
- "version" cvar: created in common.cpp, but updated when this file or qcommon.h changed only (date is not updated!)
- check: under Wine: errors does not catched (vc-win32: TRY_S/CATCH_S do works, but TRY/CATCH does not works) -- Wine bugs?
- map "flashfire":
- when paused, will display network errors (newnum!=oldnum ...)
? may be, set numClusters=0 for CM_Xxxxx() funcs (current: set for renderer only)
- a bug with collision detection against moving/rotating brushes (move through model with collision INSIDE model)
- appeared after sv_world.cpp::LinkEdict/UnlinkEdict/AreaEdicts uses num[Solid|Trig]Edicts; sometimes this var becomes <0 ...
- seems, this is a bug in game source
- game, "dead body": after player respawned, body will re-appear, and its position will be lerped from {0,0,0} (other coords?); reproduce:
1) start server, connect to it with 2nd q2 copy, look at some place, record demo
2) on 1st (or any another, but not demo-recording) q2, die few times behind player, recording demo
3) disconnect, view recorded demo ...
?) for best effect, should dead somewhere near to {0,0,0} point
?? -- is it game or my bug? may be, bug in original Q2; when bug will be reproduced: try to record same demo with ORIGINAL q2,
view demo with original and with my q2
- "dirty": "newgame" from menu: "loading" will appear, but new game not started (no alias)
?! savegame shot: when loading game/show "load menu" from non-baseq2, shot will be displayed when it is not exists in current mod,
(saved without shot) but exists in baseq2 (incorrect shot; BUT: situation, when save exists but shot -- not, may be treated as incorrect)
- explosions are invisible through non-transparent water (incorrect server-side PVS cull ?) -- should be at least dlights ?? (or not?)
? game, base1, kill all grunts -- dead bodies will fall through floor (not always)
- jumpy demo "tower" (at home, all Q2 versions -- at least from p10) -- low fps on original server computer ?
- q3 player model animation:
- when standing on a movable entity - legs will move in entity direction:
? should analyze usercmd
? check ground entity and compare player speed with its speed (dirty, map "lumber", moving tape -- CONTENTS_CURRENT_NNN|CONTENTS_SOLID)
- should detect teleports (respawns) and reset rotating submodels (current: will 'slowly' rotate from old direction to new one)
- ATI: BK_EndFrame(): if add GL_SetMultitexture(0) to the end of function, sky will be corrupted (NV -- OK); _should_ not be any effect
at all
- timing:
- after power sleep/resume FPS counter will be incorrect
? may be, use appCycles() in most places (at least, in WinMain()::MainLoop) instead of appMilliseconds() -- will require to implement
this for non-Pentium (RDTSC) platforms
? check sync of float/int versions of appMilliseconds
? for testing: may set small timescale, and display graph of local time (frame frac) -- should be smooth (not ladder/sawtooth)
- bugs with deathmatch mode
- map "dm_dukecity_beta":
- disco: neon lamp text should not disappear (bug with "dirty" only, all OK with "baseq2" -- in func_wall+func_timer implementation)
? g_misc.c::SP_light() -- disabled lights with style>=32
? crash on map change/game load with Anachronox map : crash when door/elevator moving somewhere on level -- absolute pointers ?
- z-buffer bugs with glass floor on "omd_map1"
- command completion: complete cvar with quotes - should use Com_QuoteString() before inserting into edit line; bugcheck:
1) a="""a""" b """c"""; 2) a->complete+ENTER; 3) a->complete --> will be a different line
- in windowed mode, when launching console/menu, mouse will be deactivated, but it will not be usable at all (no cursor); to use mouse,
should deactivate window
- new pmove.cpp errors:
- "ground3" cafe, on the street: cannot jump onto a corner column (horiz. speed set to 0 due to position snap)
! Win9x (98SE): when running + rotating view, when releasing <forward> key, but still rotating with mouse,
player will continue to run for a few seconds (bug present in original q2 too)
? try to close most background apps - may be, the reason is there ...
GAME DLL:
~~~~~~~~~
- after teleporter_touch() all angles will be set to null (but pmove.delta_angles[] contains angle values), and angles will be
corrected in PMove() call, which will appear only on the next call to ClientThink(). This call will be made in 2 situations:
1) when server receives another usercmd after teleport (most frequent case) - called from SV_MoveClient()
2) when teleport was occured within last usercmd, angles will be corrected in PMove() on the next server frame only
(visual appearance: after teleport player will look at yaw=0 for 1/10 of second, then will rotate to correct view angle)
UNRECOVARABLE:
~~~~~~~~~~~~~~
- rogue demo3: ".../items/defender/tris..." - linked NULL-model entity (modelindex2 > max available model index)
reason: old rogue used linked model ".../shell/...", but link was created using "modelindex|0x80"; now rogue is new, but this
demo was recorded using old game
BUGGY MAPS:
~~~~~~~~~~~
- "reboot" (from KP, user-created) pos(-658,-242,-178) dir(-0.91,0.39,0) -- incorrect backface culling in gl (OK in oldgl); reason:
gl and oldgl have different backface culling (gl -- dot(videdir,normal); oldgl -- using BSP only, w/o dot()), this
map have incorrect normal info for this surface (if look at r_surfinfo, can see: incorrect brushes too - to simplify map navigation ?)
To fix: can rebuild normals for draw surfaces
- "winter" (AQ2) pos(-1023,463,55) dir(0,1,0) - incorrect backface culling in gl (OK in oldgl) (same as "reboot")
- game=dirty, map "mine4" (baseq2), laser cannon -- when shoot rock, invisible entity painted (should not be entity at all, "hall of mirrors"
effect appears); check with baseq2 (sp+deathmatch); when do it 2nd time (wall respawned in DM) - all OK
- "team_harbor" (KP, 3rd-party) - PF_SetModel() -- NULL name (game=dirty; with baseq2 - no problems)
? try to create empty (dummy) model and assign it from PF_SetModel(name==NULL) calls
- "flashfire" (q2): 1) have cluster info per leaf, but no visinfo (so: cluster info is useless); 2) have no lightmaps, but set lightmap
sources (OpenGLDrv will display "disabled lm" + "SetLM(NULL) for non-vertex lightmap shader")
-----------------------------------------------------------------------------------------------------------------------
HARDWARE:
~~~~~~~~~
- ATI:
- when uploading rectangular texture (GL_TEXTURE_RECTANGLE_NV) in compressed internal format, app will crash in ICD GL dll
- (old drivers) when game launched fullscreen, <Alt-Enter> will switch to windowed mode with incorrect viewport (visible region);
vid_restart will not fix situation
- (Catalyst 4.9) GL_SGIS_multitexture: GL_MAX_TEXTURES_SGIS == 0, but extension is present
* gamma: after app startup (screen resolution changing) drivers will set gamma==1; tech info: main window will get messages:
WM_SYNCPAINT, WM_NCPAINT, WM_ERASEBKGND, WM_PAINT; Q3 have no this problem, UT2004 (GL) have.
* FIXED: set TOPMOST wnd attribute with SetWindowPos(), not with SetWindowLong(); when restore from minimized state - update
gamma in AppActivate() using "r_gamma->modified=true" i.e. in 1st rendering frame, not using UpdateGamma() call
- this issue appears, when pressing Alt-Tab from game few times until app will be selected again (no switch to another app
will be performed, but gamma will be damaged)
- during video playback (different task/app, using overlay), map textures will disappear (lightmaps only); when fire from
blaster (dlight) - some textures appear; may be reversed effect: have textures, but with dlight disappears;
no bug, when no 2D display at all, and when not using multitexture; vid_restart does not helps; when closing video player,
effect will stay until fire from blaster; additional bug: additive blended texture (multitexturing) may have incorrect
color (white -> green); this effect will not be corrected even after player quit and quake exit/launch (corrected after
sleep/resume or Windows restart)
- gl_interface.cpp::GL_ResetState() does not helps
- textures appears, when looking in 3rd person at some shadered models (with additive glow - "dangergirl/unpretty")
- NV
- (NV:bitdepth change, Blade3D:vid_restart): cannot restart GL with Vid_DestroyWindow(force=false) -- require to recreate window
- screenshot is black after changing color depth, but all OK when make one more vid_restart (TNT2, Win2K, 41.09)
- GF FX5200 + det.56.72, compiled_vertex_array: have geometry bugs when mixing non-CVA & CVA rendering (disappear with
gl_showtris=1); workaround: CVA is ALWAYS used (i.e. for 1-pass rendering too); ATI have no this bug
- GF FX5200: GL_EXT_texture_compression_s3tc: font image, compressed into DXT1 (with 1-bit alpha) have visual bugs (pink color on
letters); no bug with DXT5 (same bugs with GF2MX)
- when app not focused (and. may be, during video playback), wglSwapBuffers() may fail (turned fatal error -> warning)
? texture rectangle (ATI; NV untested): when "*video" created as regular texture and uploaded as rect texture, after displaying
video (exec alias "d1" -- video+demo) when level loading, displayed black rect instead of "loading" banner
? notebook keyboard: when pushing arrow keys with <Shift>, <Shift> will be unpressed while other keys is down (unable to move
crouched)
COMPILERS:
~~~~~~~~~~
- (VisualC++ 6)
- when compiling renderer with !STATIC_BUILD:
- "unguard" will be linked to "NORETURN struc.appUnwindThrow()"; VC ignores NORETURN here,
and will display warning C4715 (not all control paths return value)
- FS_LoadFile(filename, &len) have arg "unsigned *len"; using this via structure will produce warning C4700
(local variable used without having been initialized)
? "dot(const CVec3 &, const CVec3 &)" is not inlined, but "DotProduct(const float*, const float *)" inlined ...
When mark function as "__forceinline" - it will be inlined.
Reason: "dot()" uses overloaded inline "operator []", and compiler prevents from inlining nested inline functions.
Compiler even ignores "#pragma inline_depth(8)" and "/Ob1" options ... Workaround: do not use "operator []" - access
to members directly (as field)
VisualC++7 have no such problem, but when VC6 inlined dot() everywhere, VC7 inlined most of calls, but some calls
made as call to separate function.
- not understand template classes as friends (VC7 - OK)
- (VisualC++ 7)
- cannot use default arguments for functions, which are part of structure
Workaround: should use `inline Struc_Func()' (with default args) instead of struc.Func() call
- not inlined most TString<> calls (e.g. 'operator=') unless specify "__forceinline" (see dot() for VC6 above ...)
- (VisualC++ 8)
- compilation: should define _CRT_SECURE_NO_WARNINGS before any includes; when defined in Core.h, have
warnings for Win32 and OpenGLDrv files (when _CRT... not defined -- LOTS of warnings)
- VC 8 have worse issues with not-inlined functions (see VC7 bugs)
- AppName.exe.manifest issues
- GNU C++ 3.4: optimization: "-O2"-level: (all bugs - from FP hacks!?)
! all these bugs are covered with "strict-aliasing" optimization; can use "-fno-strict-aliasing" to allow FP-hack constructions.
- incorrect code, when use uint_cast():
float appRsqrt (float number)
{
float x2 = number * 0.5f;
uint_cast(number) = 0x5F3759DF - (uint_cast(number) >> 1); //!! this line will be ignored with this optimization!
number = number * (1.5f - (x2 * number * number));
return number;
}
(appearance): bugs with movement, light; when adapt appRsqrt(), movement will be correct, but lighting - not
- gl_bspmodel.cpp, LoadSurfaces2()
if (surfs->side)
{
s->plane.normal.Negate (); // inlined; -> FNegate() *3 times -- FP hack
s->plane.dist = -s->plane.dist;
s->plane.SetType (); // here: few "if (normal[] == 1|-1)" ...
}
Bug: normal.Negate() is not finished, but already analyzed in SetType(): normal==(1,0,0)=>(-1,0,0) will be analyzed as (1,0,0)
(appearance): bad light: no dlights on walls with normal {-1,0,0}; no lighting for models from this wall's SURF_LIGHT
* Also, check GCC manual:
- "3.8 Options to Request or Suppress Warnings" : '-Wstrict-aliasing' to detect possible errors -- our situations was not detected!
- "5.33 Specifying Attributes of Types" : 'may_alias' attribute
- "6.3 Restricted Pointer Aliasing": '__restrict__' keyword