Comments (3)
@Baker7 What does adding that line do? Is it because cl.csqc_vidvars.drawworld
is not set in that code branch/path, but is set in the first?
Can you also give me an example of how I would test the fix, please?
from darkplaces.
To test: Start up a map
Type r_drawworld 0 ... it should draw entities and such, but not map. Then type r_drawworld 1, it should draw everything again.
r_drawworld 0 can be invaluable during engine or map testing, you can see every entity being draw from your view.
You can also use it to determine if something is an entity.
// if CSQC is loaded, it is required to provide the CSQC_UpdateView function,
// and won't render a view if it does not call that.
if (cl.csqc_loaded) {
CL_VM_UpdateView(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime));
}
else
{
cl.csqc_vidvars.drawworld = r_drawworld.integer != 0; // Baker: this line missing <===== ===== ==== JUST ADD THIS
// Prepare the scene mesh for rendering - this is lightning beams and other effects rendered as normal surfaces
CL_MeshEntities_Scene_FinalizeRenderEntity();
CL_UpdateEntityShading();
R_RenderView(0, NULL, NULL, r_refdef.view.x, r_refdef.view.y, r_refdef.view.width, r_refdef.view.height);
}
from darkplaces.
I tried adding that line and it caused a segfault in demo1
, when the player takes a grenade to the face, when r_drawworld
is 0
.
Engine Crash: Segmentation fault
./darkplaces-sdl(CL_ParticleExplosion+0x19c)[0x55dfa2ea5e43]
./darkplaces-sdl(+0xd2eb0)[0x55dfa2ea7eb0]
./darkplaces-sdl(+0xd8c3c)[0x55dfa2eadc3c]
./darkplaces-sdl(CL_ParticleBox+0x1f)[0x55dfa2eadd6d]
./darkplaces-sdl(CL_ParticleEffect+0x21)[0x55dfa2eadd94]
./darkplaces-sdl(+0xc59cc)[0x55dfa2e9a9cc]
./darkplaces-sdl(CL_ParseServerMessage+0x2c72)[0x55dfa2e9e277]
./darkplaces-sdl(CL_ReadDemoMessage+0x334)[0x55dfa2e7e179]
./darkplaces-sdl(CL_Frame+0x355)[0x55dfa2e92be5]
./darkplaces-sdl(Host_Main+0x1b6)[0x55dfa2f2f328]
./darkplaces-sdl(main+0x1f4)[0x55dfa304abff]
/lib/x86_64-linux-gnu/libc.so.6(+0x276ca)[0x7f19948856ca]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7f1994885785]
./darkplaces-sdl(_start+0x21)[0x55dfa2e4cd71]
DarkPlaces-Quake Linux, buildstring: v20140513-1463-g58dc7879~ Apr 14 2024 debug
Segmentation fault
diff --git a/cl_screen.c b/cl_screen.c
index 04d25a01..6f0d3ccc 100644
--- a/cl_screen.c
+++ b/cl_screen.c
@@ -1686,6 +1686,8 @@ static void SCR_DrawScreen (void)
CL_VM_UpdateView(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime));
else
{
+ cl.csqc_vidvars.drawworld = r_drawworld.integer != 0;
+
// Prepare the scene mesh for rendering - this is lightning beams and other effects rendered as normal surfaces
CL_MeshEntities_Scene_FinalizeRenderEntity();
from darkplaces.
Related Issues (20)
- Is this a Darkplaces issue? WRATH crashes killing a specific enemy type HOT 2
- Quake Mods With quake.rc lacking "exec default.cfg" HOT 7
- modlist.txt looks for mods in c:\ on windows HOT 2
- makestatic on func_illusionary loses alpha
- Nehahra support is incomplete HOT 8
- Explosions leave scorch marks on water surfaces HOT 1
- Quake particle can be too small or big depending on distance
- Colour in screenshots are washed out and low contrast HOT 2
- particlefont.tga affects shape of Quake particles
- Remove Nexuiz-specific code and compile support HOT 1
- OBJ Support For MD3 Tags For Attachment Tutorial
- Improve sound/audio propagation and acoustics HOT 4
- Turning with the keys is too fast HOT 4
- ''cvar_set: variable campaign not found'' HOT 9
- Support more than just linear falloff attenuation on rtlights
- Option to restore old Darkplaces viewbob
- Can not see entities when outside the level
- New Immortal mod crashes to desktop with out of memory error HOT 1
- Allow texture variants without diffuse texture
- Explosions are missing default DarkPlaces particles HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkplaces.