source-engine/game/server/portal2/npc_wheatley_boss.cpp
tupoy-ya e8525babd1
feat(ConVar): Portal exit velocitys are no longer hard coded.
fix(Physgun): Rotation works now.
I think i took it from SourceBox or whatever it was called.

feat(Portal 2): I don't remember what i did but i did something.
A lot of that something was taken from:
https://github.com/RocketLauncher21/Portal2ASW

chore(ImGui): Updated ImGui to latest.
chore(Polyhedron): Changed a lot i don't remember where i took it from.
2024-03-10 17:41:38 +05:00

60 lines
1.1 KiB
C++

/**
* @file npc_wheatly_boss.cpp
* @brief Placeholder code for wheatley boss.
*
* @author RocketLauncher21 https://github.com/RocketLauncher21/Portal2ASW
*/
#include "cbase.h"
#include "ai_baseactor.h"
#include "ai_basenpc.h"
#include "props.h"
#define BOSS_MODEL "models/npcs/glados/glados_wheatley_boss.mdl"
class CNPCWheatleyBoss : public CAI_BaseActor
{
public:
DECLARE_CLASS(CNPCWheatleyBoss, CAI_BaseActor);
DECLARE_DATADESC();
CNPCWheatleyBoss()
{
}
bool CreateVPhysics(void)
{
VPhysicsInitNormal(SOLID_VPHYSICS, 0, false);
return true;
}
void Spawn(void);
void Precache(void);
private:
CHandle<CBasePlayer> m_hPhysicsAttacker;
COutputEvent m_OnPlayerPickup;
COutputEvent m_OnPhysGunDrop;
};
LINK_ENTITY_TO_CLASS(npc_wheatley_boss, CNPCWheatleyBoss);
BEGIN_DATADESC(CNPCWheatleyBoss)
END_DATADESC()
void CNPCWheatleyBoss::Precache(void)
{
PrecacheModel(BOSS_MODEL);
BaseClass::Precache();
}
void CNPCWheatleyBoss::Spawn(void)
{
Precache();
SetModel(BOSS_MODEL);
SetSolid(SOLID_VPHYSICS);
CreateVPhysics();
BaseClass::Spawn();
}