networking i guess
This commit is contained in:
0
game/client/milmoba/baseprojectile.cpp
Normal file
0
game/client/milmoba/baseprojectile.cpp
Normal file
0
game/client/milmoba/baseprojectile.h
Normal file
0
game/client/milmoba/baseprojectile.h
Normal file
0
game/client/milmoba/baseweapon.cpp
Normal file
0
game/client/milmoba/baseweapon.cpp
Normal file
0
game/client/milmoba/baseweapon.h
Normal file
0
game/client/milmoba/baseweapon.h
Normal file
@@ -4,21 +4,29 @@
|
||||
|
||||
void C_MOBAPlayer::Precache()
|
||||
{
|
||||
uint32_t uIndex = g_pAssetManager->LoadModel("game/core/models/cube.fmdl");
|
||||
V_printf("%u\n", uIndex);
|
||||
pModel = g_pAssetManager->GetModelByIndex(uIndex);
|
||||
SetModel("game/core/models/cube.fmdl");
|
||||
}
|
||||
|
||||
|
||||
void C_MOBAPlayer::Spawn()
|
||||
{
|
||||
Precache();
|
||||
BaseClass::Spawn();
|
||||
SetThink(Think);
|
||||
g_pWorldRenderer->SetCameraPosition({0, 0, -20});
|
||||
};
|
||||
|
||||
void C_MOBAPlayer::Think( float fDelta )
|
||||
{
|
||||
BaseClass::Think(fDelta);
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(player, C_MOBAPlayer)
|
||||
|
||||
BEGIN_DATADESC(C_MOBAPlayer)
|
||||
END_DATADESC()
|
||||
|
||||
IMPLEMENT_RECV_DT(C_MOBAPlayer)
|
||||
NetPropFloat(m_fTimer),
|
||||
END_RECV_DT()
|
||||
IMPLEMENT_EMPTY_SEND_DT(C_MOBAPlayer)
|
||||
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
|
||||
#include "baseentity.h"
|
||||
#include "worldrender.h"
|
||||
#include "game.h"
|
||||
#include "assetmgr.h"
|
||||
#ifndef MILMOBA_PLAYER_H
|
||||
#define MILMOBA_PLAYER_H
|
||||
#include "basemodelentity.h"
|
||||
|
||||
|
||||
class C_MOBAPlayer: public C_BaseEntity
|
||||
class C_MOBAPlayer: public C_BaseModelEntity
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS(C_MOBAPlayer, C_BaseEntity)
|
||||
DECLARE_CLASS(C_MOBAPlayer, C_BaseModelEntity);
|
||||
DECLARE_DATADESC();
|
||||
DECLARE_CLIENTCLASS()
|
||||
|
||||
virtual void Precache ( void ) override;
|
||||
virtual void Spawn( void ) override;
|
||||
virtual void Think( float fDelta );
|
||||
void Think( float fDelta );
|
||||
|
||||
FunnyModel_t *pModel;
|
||||
float m_fTimer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user