djcev.com

//

Git Repos / fte_dogmode / qc / compat / id1.qc

Last update to this file was on 2024-06-15 at 19:50.

Show id1.qc

//==============================================================================
// KNOWN_RELEASE_ID1 specific compatibility
//==============================================================================

//======================================================================
// fields
//======================================================================

#ifdef SSQC
.void() th_die; // maphacks
#endif

//======================================================================
// forward declarations
//======================================================================

#ifdef SSQC
float(string tex) id1_surface_type; // material type for texture name

void() boss_awake; // support for jam6_scampie
void() boss_missile1;
void() SUB_regen;
void() plat_hit_bottom;
void() train_wait;
void() enforcer_fire;
void() walkmonster_start_go;
void() walkmonster_start;
void() OgreGrenadeExplode;
void() barrel_explode;
#endif

//------------------------------------------------------------------------------

#ifdef SSQC
//----------------------------------------------------------------------
// given a texture name return a surface type. currently used for floor
// types (footstep sounds) -- CEV
//----------------------------------------------------------------------
float(string tex) id1_surface_type =
{
// this is a lot of string comparisons -- CEV
switch (tex)
{
case "grave01_3":
case "grave01_4":
case "ground1_2":
case "ground1_5":
case "ground1_6":
case "ground1_8":
case "wall11_6":
case "wgrass1_1":
case "wgrnd1_5":
case "wgrnd1_6":
return SURFACE_DIRT;
case "cop1_1":
case "cop1_2":
case "cop1_4":
case "cop1_6":
case "cop2_3":
case "cop3_4":
case "ecop1_1":
case "ecop1_4":
case "ecop1_6":
case "lgmetal2":
case "met5_1":
case "metal1_2": // the dirtiest & brownest metal
case "metal1_3":
case "metal1_4":
case "metal1_5":
case "metal1_6":
case "metal1_7":
case "metal2_1":
case "metal2_4":
case "metal2_5":
case "metal2_6":
case "metal4_4":
case "metal4_5":
case "metal4_7":
case "metal4_8":
case "metal5_1":
case "metal5_2":
case "metal5_4":
case "metalt2_6":
case "metflor2_1": // could be dirt instead
case "mmetal1_1":
case "mmetal1_3":
case "nmetal1_2":
case "nmetal2_1":
case "nmetal2_6":
case "plat_top2":
case "sfloor4_1":
case "sfloor4_2":
case "sfloor4_6":
case "wiz1_1":
case "wizmet1_1":
case "wizmet1_2":
case "wizmet1_6":
case "wizmet1_7":
case "wmet1_1":
case "wmet2_1":
case "wmet2_2": // could be dirt or wood
case "wmet2_3":
case "wmet2_4":
case "wmet4_4":
case "wmet4_7":
return SURFACE_METAL;
case "azwall3_2":
case "city1_7":
case "wizwood1_2":
case "wizwood1_4":
case "wizwood1_5":
case "wizwood1_6":
case "wizwood1_7":
case "wizwood1_8":
case "wood1_1":
case "wood1_5":
case "wood1_7":
case "woodflr1_4":
return SURFACE_WOOD;
default:
return SURFACE_STONE;
}
};

//----------------------------------------------------------------------
// generic support for func map jam 6, mostly the excellent jam6_scampie
//----------------------------------------------------------------------

//----------------------------------------------------------------------
void() boss_awake = { monster_boss_use (); };
void() boss_missile1 = { boss_atk1 (); };
void() SUB_regen = { base_item_think_respawn (); };
void() plat_hit_bottom = { func_plat_hit_bottom (); };
void() train_wait = { base_func_train_wait (); };
void() enforcer_fire = { monster_enforcer_attack (); };
void() walkmonster_start_go = { base_walkmonster_think_start (); };

//----------------------------------------------------------------------
void() walkmonster_start =
{
base_monster_init (self);
self.think = base_walkmonster_think_start;
self.nextthink = self.nextthink + random() * 0.5;
total_monsters = total_monsters + 1;
};

//----------------------------------------------------------------------
void() OgreGrenadeExplode =
{
sound (self, CHAN_VOICE, "weapons/r_exp3.wav", 1, ATTN_NORM);

self.velocity = '0 0 0';
self.destroy = sub_nulldestroy;
self.think = sub_null;
self.touch = sub_null;

projectile_grenade_think ();
};

//----------------------------------------------------------------------
void() barrel_explode =
{
base_explobox_destroy ('0 0 0');
};
#endif

Return to the top of this page or return to the overview of this repo.

Log id1.qc

Date Commit Message Author + -
2024-06-15 Major update, committing as-is, will have bugs cev +165  

Return to the top of this page or return to the overview of this repo.