Created By: Crushbug
eMail crushbug@telefragged.com
Difficulty Scale Very Easy

Intro
-----
Allrighty then. Are you doing a DM-only mod and you are sick of all that damn MONSTER code? Well 
so am I. WARNING! CHEAP PLUG! I am writing a soon-to-be-released Quake 2 compentition mod called 
Q2Comp [http://www.telefragged.com/q2comp/] hosted at the awesome TeleFragged [
http://www.telefragged.com/]. I don't need that monster code and I finally figured out how to get 
a good chunk of it out. Now this procedure does not remove all monster-related code, but it has 
taken about 100k out of my compiled DLL.

General Setup
-------------
A DM-only mod at any state of completion.

Tutorial Code
-------------
1. Open up your project and start looking for those damn monster files.

2. Remove the following from your project:
m_actor.*
m_beserk.*
m_boss2.*
m_boss31.*
m_boss32.*
m_brain.*
m_chick.*
m_flipper.*
m_float.*
m_flyer.*
m_gladiator.*
m_gunner.*
m_hover.*
m_infantry.*
m_insane.*
m_medic.*
m_mutant.*
m_parasite.*
m_rider.*
m_soldier.*
m_supertank.*
m_tank.*
Now you may only be able to remove the ".c" files and you will need to have to trigger your 
compiler's "Update Dependancies" function.

3. Now that you have removed about 500k of source files, you still need to handle the spawn 
routines for each of these monsters that will be called from the "ED_CallSpawn" function in 
"g_spawn.c". For this we need to add and create a new file in the project. Call it "removed.c" 
and here are the contents:

removed.c
============================================
// Spawn functions to remove monsters
#include "g_local.h"

void SP_monster_berserk (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_gladiator (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_gunner (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_infantry (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_soldier_light (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_soldier (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_soldier_ss (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_tank (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_medic (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_flipper (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_chick (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_parasite (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_flyer (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_brain (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_floater (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_hover (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_mutant (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_supertank (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_boss2 (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_jorg (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_boss3_stand (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_monster_commander_body (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_misc_actor (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_target_actor (edict_t *self)
{
        G_FreeEdict (self);
}

void SP_misc_insane (edict_t *self)
{
        G_FreeEdict (self);
}

============================================

4. At this point, you should be able to compile your DM-only mod without any problems. It should 
be about 100k smaller. I compile to release only with MS VC 4.0, so your milage may vary.

Ending
------
This is my first tutorial, as well as my first attempt at C programming. Let me know what you 
think, or if you find out more MONSTER-only functions that can be removed.

CrushBug
crushbug@telefragged.com

Tutorial html coding modified by legion.


If it is created, then it is copyrighted. Quake 2 Tutorial #12 is (c)1997-98 by Crushbug
and the
Inside3D staff. The site is hosted by the one and only TeleFragged. Please direct any
flames, comments, or praises to the author. Any and all information found in this tutorial may
be used in any Quake modification provided that the author and the Inside3D staff are credited.