diff --git a/TODO b/TODO index 5cf3d94..7ffdb4a 100644 --- a/TODO +++ b/TODO @@ -25,7 +25,7 @@ http://gozer.quakeforge.net/list-archives/quakeforge-cvs/2002-April/000151.html from http://www.quakesrc.org/?Page=tutorials&Dir=Quake2 : (replace - with X when done) -- Removing shadows on certain objects +X Removing shadows on certain objects - Fixing dlight shine trough - Fix for left over icons on windows taskbar - Adding a clock to the console diff --git a/src/baseq2/g_weapon.c b/src/baseq2/g_weapon.c index 53f4bee..7ca442f 100644 --- a/src/baseq2/g_weapon.c +++ b/src/baseq2/g_weapon.c @@ -1,25 +1,26 @@ -/* -Copyright (C) 1997-2001 Id Software, Inc. +/* $Id$ + * + * Copyright (C) 1997-2001 Id Software, Inc. + * Copyright (c) 2002 The Quakeforge Project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ #include "g_local.h" - /* ================= check_dodge @@ -374,6 +375,7 @@ void fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee bolt->think = G_FreeEdict; bolt->dmg = damage; bolt->classname = "bolt"; + bolt->s.renderfx = RF_NOSHADOW; if (hyper) bolt->spawnflags = 1; gi.linkentity (bolt); @@ -483,6 +485,7 @@ static void Grenade_Touch (edict_t *ent, edict_t *other, cplane_t *plane, csurfa Grenade_Explode (ent); } +/* gren launcher */ void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius) { edict_t *grenade; @@ -516,6 +519,7 @@ void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int s gi.linkentity (grenade); } +/* hand grenade */ void fire_grenade2 (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius, qboolean held) { edict_t *grenade; @@ -642,6 +646,7 @@ void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed rocket->dmg_radius = damage_radius; rocket->s.sound = gi.soundindex ("weapons/rockfly.wav"); rocket->classname = "rocket"; + rocket->s.renderfx = RF_NOSHADOW; if (self->client) check_dodge (self, rocket->s.origin, dir, speed); diff --git a/src/cl_tent.c b/src/cl_tent.c index 85593f7..11b6386 100644 --- a/src/cl_tent.c +++ b/src/cl_tent.c @@ -1,24 +1,26 @@ -/* -Copyright (C) 1997-2001 Id Software, Inc. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -// cl_tent.c -- client side temporary entities - +/* $Id$ + * + * client side temporary entities + * + * Copyright (C) 1997-2001 Id Software, Inc. + * Copyright (c) 2002 The Quakeforge Project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #include "client.h" typedef enum @@ -839,7 +841,7 @@ void CL_ParseTEnt (void) ex = CL_AllocExplosion (); VectorCopy (pos, ex->ent.origin); ex->type = ex_poly; - ex->ent.flags = RF_FULLBRIGHT; + ex->ent.flags = RF_FULLBRIGHT|RF_NOSHADOW; ex->start = cl.frame.servertime - 100; ex->light = 350; ex->lightcolor[0] = 1.0; @@ -862,7 +864,7 @@ void CL_ParseTEnt (void) ex = CL_AllocExplosion (); VectorCopy (pos, ex->ent.origin); ex->type = ex_poly; - ex->ent.flags = RF_FULLBRIGHT; + ex->ent.flags = RF_FULLBRIGHT|RF_NOSHADOW; ex->start = cl.frame.servertime - 100; ex->light = 350; ex->lightcolor[0] = 1.0; @@ -887,7 +889,7 @@ void CL_ParseTEnt (void) ex = CL_AllocExplosion (); VectorCopy (pos, ex->ent.origin); ex->type = ex_poly; - ex->ent.flags = RF_FULLBRIGHT; + ex->ent.flags = RF_FULLBRIGHT|RF_NOSHADOW; ex->start = cl.frame.servertime - 100; ex->light = 350; ex->lightcolor[0] = 1.0; @@ -914,7 +916,7 @@ void CL_ParseTEnt (void) ex = CL_AllocExplosion (); VectorCopy (pos, ex->ent.origin); ex->type = ex_poly; - ex->ent.flags = RF_FULLBRIGHT; + ex->ent.flags = RF_FULLBRIGHT|RF_NOSHADOW; ex->start = cl.frame.servertime - 100; ex->light = 350; ex->lightcolor[0] = 0.0; @@ -1064,7 +1066,7 @@ void CL_ParseTEnt (void) ex = CL_AllocExplosion (); VectorCopy (pos, ex->ent.origin); ex->type = ex_poly; - ex->ent.flags = RF_FULLBRIGHT; + ex->ent.flags = RF_FULLBRIGHT|RF_NOSHADOW; ex->start = cl.frame.servertime - 100; ex->light = 350; ex->lightcolor[0] = 1.0; diff --git a/src/ctf/g_weapon.c b/src/ctf/g_weapon.c index 214df86..1950dce 100644 --- a/src/ctf/g_weapon.c +++ b/src/ctf/g_weapon.c @@ -1,25 +1,26 @@ -/* -Copyright (C) 1997-2001 Id Software, Inc. +/* $Id$ + * + * Copyright (C) 1997-2001 Id Software, Inc. + * Copyright (c) 2002 The Quakeforge Project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ #include "g_local.h" - /* ================= check_dodge @@ -369,6 +370,7 @@ void fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int spee bolt->think = G_FreeEdict; bolt->dmg = damage; bolt->classname = "bolt"; + bolt->s.renderfx = RF_NOSHADOW; if (hyper) bolt->spawnflags = 1; gi.linkentity (bolt); @@ -478,6 +480,7 @@ static void Grenade_Touch (edict_t *ent, edict_t *other, cplane_t *plane, csurfa Grenade_Explode (ent); } +/* gren launcher */ void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius) { edict_t *grenade; @@ -511,6 +514,7 @@ void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int s gi.linkentity (grenade); } +/* hand grenade */ void fire_grenade2 (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius, qboolean held) { edict_t *grenade; @@ -637,6 +641,7 @@ void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed rocket->dmg_radius = damage_radius; rocket->s.sound = gi.soundindex ("weapons/rockfly.wav"); rocket->classname = "rocket"; + rocket->s.renderfx = RF_NOSHADOW; if (self->client) check_dodge (self, rocket->s.origin, dir, speed); diff --git a/src/gl_mesh.c b/src/gl_mesh.c index 53bb1dd..e1ca195 100644 --- a/src/gl_mesh.c +++ b/src/gl_mesh.c @@ -857,8 +857,8 @@ void R_DrawAliasModel (entity_t *e) qglDepthRange (gldepthmin, gldepthmax); //#if 1 - if (gl_shadows->value && !(currententity->flags & (RF_TRANSLUCENT | RF_WEAPONMODEL))) - { + if (gl_shadows->value && + !(currententity->flags & (RF_TRANSLUCENT|RF_WEAPONMODEL|RF_NOSHADOW))) { qglPushMatrix (); /* don't rotate shadows on ungodly axes */ diff --git a/src/q_shared.h b/src/q_shared.h index 8d44f40..5f1a110 100644 --- a/src/q_shared.h +++ b/src/q_shared.h @@ -1,4 +1,6 @@ /* $Id$ + * + * included first by ALL program modules * * Copyright (C) 1997-2001 Id Software, Inc. * Copyright (c) 2002 The Quakeforge Project. @@ -20,8 +22,6 @@ */ #include "gcc_attr.h" - -// q_shared.h -- included first by ALL program modules #ifdef _WIN32 // unknown pragmas are SUPPOSED to be ignored, but.... @@ -611,6 +611,7 @@ typedef struct #define RF_SHELL_RED 1024 #define RF_SHELL_GREEN 2048 #define RF_SHELL_BLUE 4096 +#define RF_NOSHADOW 8192 /* don't draw a shadow */ //ROGUE #define RF_IR_VISIBLE 0x00008000 // 32768