[server] Implement CNetGame::GetWeaponName(...)

This commit is contained in:
RD42 2024-04-24 22:45:44 +08:00
parent b59c904836
commit 9afbff84dc
2 changed files with 161 additions and 0 deletions

View File

@ -579,7 +579,114 @@ void CNetGame::LoadBanList()
// TODO: CNetGame::LoadBanList W: 48EAE0 L: 80AF1A0
}
//----------------------------------------------------
DWORD CNetGame::GetTime()
{
return (DWORD)RakNet::GetTime();
}
//----------------------------------------------------
const PCHAR CNetGame::GetWeaponName(int iWeaponID)
{
switch(iWeaponID) {
case WEAPON_BRASSKNUCKLE:
return "Brass Knuckles";
case WEAPON_GOLFCLUB:
return "Golf Club";
case WEAPON_NITESTICK:
return "Nite Stick";
case WEAPON_KNIFE:
return "Knife";
case WEAPON_BAT:
return "Baseball Bat";
case WEAPON_SHOVEL:
return "Shovel";
case WEAPON_POOLSTICK:
return "Pool Cue";
case WEAPON_KATANA:
return "Katana";
case WEAPON_CHAINSAW:
return "Chainsaw";
case WEAPON_DILDO:
return "Dildo";
case WEAPON_DILDO2:
return "Dildo";
case WEAPON_VIBRATOR:
return "Vibrator";
case WEAPON_VIBRATOR2:
return "Vibrator";
case WEAPON_FLOWER:
return "Flowers";
case WEAPON_CANE:
return "Cane";
case WEAPON_GRENADE:
return "Grenade";
case WEAPON_TEARGAS:
return "Teargas";
case WEAPON_MOLTOV:
return "Molotov Cocktail";
case WEAPON_COLT45:
return "Colt 45";
case WEAPON_SILENCED:
return "Silenced Pistol";
case WEAPON_DEAGLE:
return "Desert Eagle";
case WEAPON_SHOTGUN:
return "Shotgun";
case WEAPON_SAWEDOFF:
return "Sawn-off Shotgun";
case WEAPON_SHOTGSPA: // wtf?
return "Combat Shotgun";
case WEAPON_UZI:
return "UZI";
case WEAPON_MP5:
return "MP5";
case WEAPON_AK47:
return "AK47";
case WEAPON_M4:
return "M4";
case WEAPON_TEC9:
return "TEC9";
case WEAPON_RIFLE:
return "Rifle";
case WEAPON_SNIPER:
return "Sniper Rifle";
case WEAPON_ROCKETLAUNCHER:
return "Rocket Launcher";
case WEAPON_HEATSEEKER:
return "Heat Seaker";
case WEAPON_FLAMETHROWER:
return "Flamethrower";
case WEAPON_MINIGUN:
return "Minigun";
case WEAPON_SATCHEL:
return "Satchel Explosives";
case WEAPON_BOMB:
return "Bomb";
case WEAPON_SPRAYCAN:
return "Spray Can";
case WEAPON_FIREEXTINGUISHER:
return "Fire Extinguisher";
case WEAPON_CAMERA:
return "Camera";
case WEAPON_NIGHTVISION:
return "Night Vision";
case WEAPON_INFRARED:
return "Thermal Goggles";
case WEAPON_PARACHUTE:
return "Parachute";
case WEAPON_VEHICLE:
return "Vehicle";
case WEAPON_DROWN:
return "Drowned";
case WEAPON_COLLISION:
return "Splat";
}
return "";
}
//----------------------------------------------------
// EOF

View File

@ -92,7 +92,61 @@ public:
// CLASS SYSTEM
int m_iSpawnsAvailable;
PLAYER_SPAWN_INFO m_AvailableSpawns[MAX_SPAWNS];
const PCHAR GetWeaponName(int iWeaponID);
DWORD GetTime();
};
//----------------------------------------------------
#define WEAPON_BRASSKNUCKLE 1
#define WEAPON_GOLFCLUB 2
#define WEAPON_NITESTICK 3
#define WEAPON_KNIFE 4
#define WEAPON_BAT 5
#define WEAPON_SHOVEL 6
#define WEAPON_POOLSTICK 7
#define WEAPON_KATANA 8
#define WEAPON_CHAINSAW 9
#define WEAPON_DILDO 10
#define WEAPON_DILDO2 11
#define WEAPON_VIBRATOR 12
#define WEAPON_VIBRATOR2 13
#define WEAPON_FLOWER 14
#define WEAPON_CANE 15
#define WEAPON_GRENADE 16
#define WEAPON_TEARGAS 17
#define WEAPON_MOLTOV 18
#define WEAPON_COLT45 22
#define WEAPON_SILENCED 23
#define WEAPON_DEAGLE 24
#define WEAPON_SHOTGUN 25
#define WEAPON_SAWEDOFF 26
#define WEAPON_SHOTGSPA 27
#define WEAPON_UZI 28
#define WEAPON_MP5 29
#define WEAPON_AK47 30
#define WEAPON_M4 31
#define WEAPON_TEC9 32
#define WEAPON_RIFLE 33
#define WEAPON_SNIPER 34
#define WEAPON_ROCKETLAUNCHER 35
#define WEAPON_HEATSEEKER 36
#define WEAPON_FLAMETHROWER 37
#define WEAPON_MINIGUN 38
#define WEAPON_SATCHEL 39
#define WEAPON_BOMB 40
#define WEAPON_SPRAYCAN 41
#define WEAPON_FIREEXTINGUISHER 42
#define WEAPON_CAMERA 43
#define WEAPON_NIGHTVISION 44
#define WEAPON_INFRARED 45
#define WEAPON_PARACHUTE 46
#define WEAPON_VEHICLE 49
#define WEAPON_DROWN 53
#define WEAPON_COLLISION 54
//----------------------------------------------------
#endif