Q2Max/Rogue Tesla item crash
qudos
qudos2 at gmail.com
Wed Nov 9 06:02:15 EST 2005
Some functions were not added when qmax port was implemented on the tree
For test, download the XXX mission from this site, this mod share the rogue code
http://www.milous.net/quake2/index.html
Paste the game.so from rogue in the xxx dir , launch the game and use
the tesla item, for sure will go to crash.
Diffs=
diff -Naur CVS/cl_fx.c tesla_patch/cl_fx.c
--- CVS/cl_fx.c 2005-11-09 11:36:33.603509928 +0100
+++ tesla_patch/cl_fx.c 2005-11-09 11:31:25.000000000 +0100
@@ -2676,4 +2676,47 @@
pBlasterThink,true);
}
}
+
+/*
+===============
+CL_LightningBeam
+===============
+*/
+
+void CL_LightningBeam(vec3_t start, vec3_t end, int srcEnt, int
dstEnt, float size)
+{
+ cparticle_t *list;
+ cparticle_t *p=NULL;
+
+ for (list=active_particles ; list ; list=list->next)
+ if (list->src_ent == srcEnt && list->dst_ent == dstEnt &&
list->image == particle_lightning)
+ {
+ p=list;
+ p->start = p->time = newParticleTime();
+ VectorCopy(start, p->angle);
+ VectorCopy(end, p->org);
+
+ return;
+ }
+
+ p = setupParticle (
+ start[0], start[1], start[2],
+ end[0], end[1], end[2],
+ 0, 0, 0,
+ 0, 0, 0,
+ 255, 255, 255,
+ 0, 0, 0,
+ 1, -2,
+ GL_SRC_ALPHA, GL_ONE,
+ size, 0,
+ particle_lightning,
+ PART_LIGHTNING,
+ 0, false);
+
+ if (!p)
+ return;
+
+ p->src_ent=srcEnt;
+ p->dst_ent=dstEnt;
+}
#endif
diff -Naur CVS/cl_tent.c tesla_patch/cl_tent.c
--- CVS/cl_tent.c 2002-10-08 22:03:00.000000000 +0200
+++ tesla_patch/cl_tent.c 2005-11-09 11:26:24.938041144 +0100
@@ -501,6 +501,25 @@
CL_ParseLightning
=================
*/
+#ifdef QMAX
+void CL_LightningBeam(vec3_t start, vec3_t end, int srcEnt, int
dstEnt, float size);
+int CL_ParseLightning (float size)
+{
+
+ vec3_t start, end;
+ int srcEnt, dstEnt;
+
+ srcEnt = MSG_ReadShort (&net_message);
+ dstEnt = MSG_ReadShort (&net_message);
+
+ MSG_ReadPos (&net_message, start);
+ MSG_ReadPos (&net_message, end);
+
+ CL_LightningBeam(start, end, srcEnt, dstEnt, 5);
+
+ return srcEnt;
+}
+#else
int CL_ParseLightning (struct model_s *model)
{
int srcEnt, destEnt;
@@ -548,7 +567,7 @@
Com_Printf ("beam list overflow!\n");
return srcEnt;
}
-
+#endif
/*
=================
CL_ParseLaser
Cheers
More information about the quake2
mailing list