mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
521 lines
24 KiB
C++
521 lines
24 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
|
|
#include "StdH.h"
|
|
#include "Models/Items/ItemHolder/ItemHolder.h"
|
|
#include "Models/Items/Ammo/Shells/Shells.h"
|
|
#include "Models/Items/Ammo/Bullets/Bullets.h"
|
|
#include "Models/Items/Ammo/Rockets/Rockets.h"
|
|
#include "Models/Weapons/RocketLauncher/Projectile/Rocket.h"
|
|
#include "Models/Items/Ammo/Grenades/Grenades.h"
|
|
#include "Models/Items/Ammo/Electricity/Electricity.h"
|
|
#include "Models/Items/Ammo/Cannonball/Cannonball.h"
|
|
#include "Models/Items/Ammo/Cannonball/CannonballQuad.h"
|
|
#include "ModelsMP/Items/Ammo/SniperBullets/SniperBullets.h"
|
|
|
|
#include <EntitiesMP/AmmoItem.h>
|
|
#include <EntitiesMP/AmmoItem_tables.h>
|
|
CEntityEvent *EAmmoItem::MakeCopy(void) { CEntityEvent *peeCopy = new EAmmoItem(*this); return peeCopy;}
|
|
EAmmoItem::EAmmoItem() : CEntityEvent(EVENTCODE_EAmmoItem) {;
|
|
ClearToDefault(EaitType);
|
|
ClearToDefault(iQuantity);
|
|
};
|
|
void CAmmoItem::SetDefaultProperties(void) {
|
|
m_EaitType = AIT_SHELLS ;
|
|
CItem::SetDefaultProperties();
|
|
}
|
|
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
void CAmmoItem::Precache(void) {
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
PrecacheSound (SOUND_PICK );
|
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
void CAmmoItem::RenderParticles(void) {
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(GetRenderType () != CEntity :: RT_MODEL || GetSP () -> sp_gmGameMode > CSessionProperties :: GM_COOPERATIVE
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
|| ! ShowItemParticles ())
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
{
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
return ;
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
switch(m_EaitType ){
|
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SHELLS :
|
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 1.0f * 0.75 , 1.0f * 0.75 , PT_STAR04 , 4);
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_BULLETS :
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 1.5f * 0.75 , 1.0f * 0.75 , PT_STAR04 , 6);
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_ROCKETS :
|
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 1.5f * 0.75 , 1.25f * 0.75 , PT_STAR04 , 6);
|
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_GRENADES :
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 2.0f * 0.75 , 1.25f * 0.75 , PT_STAR04 , 6);
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_ELECTRICITY :
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 1.5f * 0.75 , 1.125f * 0.75 , PT_STAR04 , 6);
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_NUKEBALL :
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 1.25f * 0.75 , 1.0f * 0.75 , PT_STAR04 , 4);
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_IRONBALLS :
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 2.0f * 0.75 , 1.25f * 0.75 , PT_STAR04 , 8);
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_BACKPACK :
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 3.0f * 0.5 , 2.5f * 0.5 , PT_STAR04 , 10);
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SERIOUSPACK :
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 3.0f * 0.5 , 2.5f * 0.5 , PT_STAR04 , 10);
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_NAPALM :
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 3.0f * 0.5 , 2.5f * 0.5 , PT_STAR04 , 10);
|
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SNIPERBULLETS :
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Particles_Spiral (this , 1.5f * 0.75 , 1.25f * 0.75 , PT_STAR04 , 6);
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
BOOL CAmmoItem::FillEntityStatistics(EntityStats * pes)
|
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
{
|
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_ctCount = 1;
|
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_ctAmmount = m_fValue ;
|
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
switch(m_EaitType ){
|
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SHELLS :
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Shells";
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_SHELLS ;
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_BULLETS :
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Bullets";
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_BULLETS ;
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_ROCKETS :
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Rockets";
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_ROCKETS ;
|
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_GRENADES :
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Grenades";
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_GRENADES ;
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_ELECTRICITY :
|
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Electricity";
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_ELECTRICITY ;
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_IRONBALLS :
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Ironballs";
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_IRONBALLS ;
|
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SERIOUSPACK :
|
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "SeriousPack";
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * 100000;
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_BACKPACK :
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "BackPack";
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * 100000;
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_NAPALM :
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Napalm";
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_NAPALM ;
|
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SNIPERBULLETS :
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_strName = "Sniper bullets";
|
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_fValue = m_fValue * AV_SNIPERBULLETS ;
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
pes -> es_iScore = 0;
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
return TRUE ;
|
|
#line 226 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
void CAmmoItem::SetProperties(void)
|
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
{
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
switch(m_EaitType ){
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SHELLS :
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 10.0f;
|
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Shells: %d" , (int ) m_fValue );
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_SHELLS , TEXTURE_SHELLS , 0 , 0 , 0);
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.25f , 0) , FLOAT3D (1.5 , 1.5 , 0.75f));
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.75f , 0.75f , 0.75f));
|
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_BULLETS :
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 50.0f;
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Bullets: %d" , (int ) m_fValue );
|
|
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_BULLETS , TEXTURE_BULLETS , 0 , 0 , 0);
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.6f , 0) , FLOAT3D (3 , 3 , 1.0f));
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.75f , 0.75f , 0.75f));
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_ROCKETS :
|
|
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 5.0f;
|
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Rockets: %d" , (int ) m_fValue );
|
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_ROCKETS , TEXTURE_ROCKET , 0 , 0 , 0);
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ROCKETS_ATTACHMENT_ROCKET1 , MODEL_RC_ROCKET , TEXTURE_ROCKET , 0 , 0 , 0);
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ROCKETS_ATTACHMENT_ROCKET2 , MODEL_RC_ROCKET , TEXTURE_ROCKET , 0 , 0 , 0);
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ROCKETS_ATTACHMENT_ROCKET3 , MODEL_RC_ROCKET , TEXTURE_ROCKET , 0 , 0 , 0);
|
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ROCKETS_ATTACHMENT_ROCKET4 , MODEL_RC_ROCKET , TEXTURE_ROCKET , 0 , 0 , 0);
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ROCKETS_ATTACHMENT_ROCKET5 , MODEL_RC_ROCKET , TEXTURE_ROCKET , 0 , 0 , 0);
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
SetItemAttachmentAnim (ROCKETS_ATTACHMENT_ROCKET1 , ROCKET_ANIM_FORAMMO );
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
SetItemAttachmentAnim (ROCKETS_ATTACHMENT_ROCKET2 , ROCKET_ANIM_FORAMMO );
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
SetItemAttachmentAnim (ROCKETS_ATTACHMENT_ROCKET3 , ROCKET_ANIM_FORAMMO );
|
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
SetItemAttachmentAnim (ROCKETS_ATTACHMENT_ROCKET4 , ROCKET_ANIM_FORAMMO );
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
SetItemAttachmentAnim (ROCKETS_ATTACHMENT_ROCKET5 , ROCKET_ANIM_FORAMMO );
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.6f , 0) , FLOAT3D (2 , 2 , 0.75f));
|
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.75f , 0.75f , 0.75f));
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_GRENADES :
|
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 5.0f;
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Grenades: %d" , (int ) m_fValue );
|
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_GRENADES , TEXTURE_GRENADES , 0 , 0 , 0);
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.6f , 0) , FLOAT3D (4 , 4 , 1.0f));
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.75f , 0.75f , 0.75f));
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_ELECTRICITY :
|
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 50.0f;
|
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Electricity: %d" , (int ) m_fValue );
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_ELECTRICITY , TEXTURE_ELECTRICITY , TEXTURE_EL_EFFECT , TEXTURE_EL_EFFECT , 0);
|
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ELECTRICITY_ATTACHMENT_EFFECT1 , MODEL_EL_EFFECT , TEXTURE_EL_EFFECT , 0 , 0 , 0);
|
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ELECTRICITY_ATTACHMENT_EFFECT2 , MODEL_EL_EFFECT , TEXTURE_EL_EFFECT , 0 , 0 , 0);
|
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItemAttachment (ELECTRICITY_ATTACHMENT_EFFECT3 , MODEL_EL_EFFECT2 , TEXTURE_EL_EFFECT , 0 , 0 , 0);
|
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.6f , 0) , FLOAT3D (3 , 3 , 0.8f));
|
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.75f , 0.75f , 0.75f));
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_IRONBALLS :
|
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 4.0f;
|
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Iron balls: %d" , (int ) m_fValue );
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_CANNONBALLS , TEXTURE_IRONBALL , TEX_REFL_DARKMETAL , TEX_SPEC_WEAK , 0);
|
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (5 , 5 , 1.3f));
|
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.75f , 0.75f , 0.75f));
|
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_NAPALM :
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 100.0f;
|
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Napalm: %d" , (int ) m_fValue );
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_FL_RESERVOIR , TEXTURE_FL_FUELRESERVOIR , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (3 , 3 , 1.0f));
|
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (1.25f , 1.25f , 1.25f));
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SERIOUSPACK :
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 1.0f;
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("SeriousPack: %d" , (int ) m_fValue );
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_SERIOUSPACK , TEXTURE_SERIOUSPACK , 0 , 0 , 0);
|
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (2 , 2 , 1.3f));
|
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.5f , 0.5f , 0.5f));
|
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_BACKPACK :
|
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 1.0f;
|
|
#line 331 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("BackPack: %d" , (int ) m_fValue );
|
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_BACKPACK , TEXTURE_BACKPACK , 0 , 0 , 0);
|
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (2 , 2 , 1.3f));
|
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (0.5f , 0.5f , 0.5f));
|
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
case AIT_SNIPERBULLETS :
|
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = 5.0f;
|
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 30.0f;
|
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_strDescription . PrintF ("Sniper bullets: %d" , (int ) m_fValue );
|
|
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddItem (MODEL_SNIPER_BULLETS , TEXTURE_SNIPER_BULLETS , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
|
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (3 , 3 , 1.0f));
|
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StretchItem (FLOAT3D (1.25f , 1.25f , 1.25f));
|
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
break ;
|
|
#line 347 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
default : ASSERTALWAYS ("Uknown ammo");
|
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 349 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
|
|
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
void CAmmoItem::AdjustDifficulty(void)
|
|
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
{
|
|
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fValue = ceil (m_fValue * GetSP () -> sp_fAmmoQuantity );
|
|
#line 355 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(GetSP () -> sp_bInfiniteAmmo && m_penTarget == NULL ){
|
|
#line 356 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Destroy ();
|
|
#line 357 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
BOOL CAmmoItem::
|
|
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
ItemCollected(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAmmoItem_ItemCollected
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EPass, "CAmmoItem::ItemCollected expects 'EPass' as input!"); const EPass &epass = (const EPass &)__eeInput;
|
|
#line 362 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
ASSERT (epass . penOther != NULL );
|
|
#line 365 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(GetSP () -> sp_bAmmoStays && ! (m_bPickupOnce || m_bRespawn )){
|
|
#line 367 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
BOOL bWasPicked = MarkPickedBy (epass . penOther );
|
|
#line 368 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(bWasPicked ){
|
|
#line 370 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 370 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
return TRUE;
|
|
#line 371 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 372 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
EAmmoItem eAmmo ;
|
|
#line 376 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
eAmmo . EaitType = m_EaitType ;
|
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
eAmmo . iQuantity = (INDEX) m_fValue ;
|
|
#line 379 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(epass . penOther -> ReceiveItem (eAmmo )){
|
|
#line 381 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_soPick . Set3DParameters (50.0f , 1.0f , 1.0f , 1.0f);
|
|
#line 382 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(_pNetwork -> IsPlayerLocal (epass . penOther )){IFeel_PlayEffect ("PU_Ammo");}
|
|
#line 383 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if((m_EaitType == AIT_SERIOUSPACK ) || (m_EaitType == AIT_BACKPACK ))
|
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
{
|
|
#line 385 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
PlaySound (m_soPick , SOUND_DEFAULT , SOF_3D );
|
|
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
CPrintF ("^cFF0000^f5Warning!!! Replace old serious pack with new, BackPack entity!^r\n");
|
|
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 388 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
else
|
|
#line 389 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
{
|
|
#line 390 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
PlaySound (m_soPick , SOUND_PICK , SOF_3D );
|
|
#line 391 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 392 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_fPickSoundLen = GetSoundLength (SOUND_PICK );
|
|
#line 393 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(! GetSP () -> sp_bAmmoStays || (m_bPickupOnce || m_bRespawn )){
|
|
#line 394 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Jump(STATE_CURRENT, STATE_CItem_ItemReceived, FALSE, EVoid());return TRUE;
|
|
#line 395 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CAmmoItem::
|
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAmmoItem_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAmmoItem::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 401 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
if(m_EaitType == AIT_NUKEBALL ){
|
|
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
m_EaitType = AIT_SHELLS ;
|
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
}
|
|
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Initialize ();
|
|
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
StartModelAnim (ITEMHOLDER_ANIM_MEDIUMOSCILATION , AOF_LOOPING | AOF_NORESTART );
|
|
#line 406 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_MEDIUM );
|
|
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
SetProperties ();
|
|
#line 409 "D:/SE1_GPL/Sources/EntitiesMP/AmmoItem.es"
|
|
Jump(STATE_CURRENT, STATE_CItem_ItemLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |