networking
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "engine.h"
|
||||
#include "rendering.h"
|
||||
#include "input.h"
|
||||
#include "fgui/widget.h"
|
||||
#include "fgui/label.h"
|
||||
|
||||
class C_MOBAPlayer: public C_BaseEntity
|
||||
{
|
||||
@@ -18,10 +20,13 @@ void C_MOBAPlayer::Precache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CFGUI_Label *pText = new CFGUI_Label();
|
||||
void C_MOBAPlayer::Spawn()
|
||||
{
|
||||
|
||||
pText->SetFont("fonts/IBMPlexMono-Regular");
|
||||
pText->SetPosition(100, 100);
|
||||
pText->SetLabelSize(15);
|
||||
pText->SetLabel("Hello, world!");
|
||||
};
|
||||
|
||||
void C_MOBAPlayer::Destroy()
|
||||
@@ -34,11 +39,11 @@ void C_MOBAPlayer::Think( float fDelta )
|
||||
float y = g_fAxisValues[AXIS_MOUSE_Y];
|
||||
float fPitch = glm_rad(x);
|
||||
float fYaw = glm_rad(y);
|
||||
glm_mat4_identity(g_cameraView);
|
||||
glm_rotate_z(g_cameraView, fYaw, g_cameraView);
|
||||
glm_rotate_y(g_cameraView, fPitch, g_cameraView);
|
||||
if (g_localClient.pBasePlayer == pEntity)
|
||||
if (g_localClient->pBasePlayer == pEntity)
|
||||
{
|
||||
glm_mat4_identity(g_cameraView);
|
||||
glm_rotate_z(g_cameraView, fYaw, g_cameraView);
|
||||
glm_rotate_y(g_cameraView, fPitch, g_cameraView);
|
||||
g_cameraView[3][0] = pEntity->m_position[0];
|
||||
g_cameraView[3][1] = pEntity->m_position[1];
|
||||
g_cameraView[3][2] = pEntity->m_position[2]+0.7;
|
||||
|
||||
Reference in New Issue
Block a user