sin-2015/ammo.cpp
1999-04-22 00:00:00 +00:00

190 lines
3 KiB
C++

// Copyright (C) 1997 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source is may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// DESCRIPTION:
// Base class for all ammunition for entities derived from the Weapon class.
//
#include "g_local.h"
#include "item.h"
#include "ammo.h"
CLASS_DECLARATION( Item, Ammo, NULL );
ResponseDef Ammo::Responses[] =
{
{ NULL, NULL }
};
Ammo::Ammo()
{
Set( 0 );
}
void Ammo::Setup
(
const char *model
)
{
const char * m;
m = G_GetSpawnArg( "model" );
if ( m )
{
setModel( m );
}
else
{
assert( model );
setModel( model );
}
}
CLASS_DECLARATION( Ammo, Bullet10mm, "ammo_10mm" );
ResponseDef Bullet10mm::Responses[] =
{
{ NULL, NULL }
};
Bullet10mm::Bullet10mm()
{
Setup( "357.def" );
}
CLASS_DECLARATION( Ammo, Bullet50mm, "ammo_50mm" );
ResponseDef Bullet50mm::Responses[] =
{
{ NULL, NULL }
};
Bullet50mm::Bullet50mm()
{
Setup( "50mm.def" );
}
CLASS_DECLARATION( Ammo, BulletPulse, "ammo_pulserifle" );
ResponseDef BulletPulse::Responses[] =
{
{ NULL, NULL }
};
BulletPulse::BulletPulse()
{
Setup( "pulse_ammo.def" );
}
CLASS_DECLARATION( Ammo, BulletSniper, "ammo_sniperrifle" );
ResponseDef BulletSniper::Responses[] =
{
{ NULL, NULL }
};
BulletSniper::BulletSniper()
{
Setup( "sniper_ammo.def" );
}
CLASS_DECLARATION( Ammo, Rockets, "ammo_rockets" );
ResponseDef Rockets::Responses[] =
{
{ NULL, NULL }
};
Rockets::Rockets()
{
Setup( "rockets.def" );
}
CLASS_DECLARATION( Ammo, Spears, "ammo_speargun" );
ResponseDef Spears::Responses[] =
{
{ NULL, NULL }
};
Spears::Spears()
{
Setup( "spear_ammo.def" );
}
CLASS_DECLARATION( Ammo, ShotgunClip, "ammo_shotgunclip" );
ResponseDef ShotgunClip::Responses[] =
{
{ NULL, NULL }
};
ShotgunClip::ShotgunClip()
{
Setup( "shotgunclip.def" );
}
CLASS_DECLARATION( Ammo, SpiderMines, "ammo_spidermines" );
ResponseDef SpiderMines::Responses[] =
{
{ NULL, NULL }
};
SpiderMines::SpiderMines()
{
Setup( "mine.def" );
}
//### new ammo types
CLASS_DECLARATION(Ammo, Missiles, "ammo_missiles");
ResponseDef Missiles::Responses[] =
{
{NULL, NULL}
};
Missiles::Missiles()
{
Setup( "ammo_missiles.def" );
}
CLASS_DECLARATION(Ammo, IlludiumModules, "ammo_illudium");
ResponseDef IlludiumModules::Responses[] =
{
{NULL, NULL}
};
IlludiumModules::IlludiumModules()
{
Setup( "ammo_illudium.def" );
}
CLASS_DECLARATION(Ammo, ConcussionBattery, "dummy_concussionbattery");
ResponseDef ConcussionBattery::Responses[] =
{
{NULL, NULL}
};
ConcussionBattery::ConcussionBattery()
{
Setup( "concussionbattery.def" );
}
CLASS_DECLARATION(Ammo, FlameFuel, "dummy_flamethrowerfuel");
ResponseDef FlameFuel::Responses[] =
{
{NULL, NULL}
};
FlameFuel::FlameFuel()
{
Setup( "flamethrowerfuel.def" );
}
//###