2012-06-28 00:33:23 +00:00
|
|
|
/*
|
|
|
|
entities.h
|
|
|
|
|
|
|
|
Entity management
|
|
|
|
|
|
|
|
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
|
|
|
|
|
|
|
Author: Bill Currie <bill@taniwha.org>
|
|
|
|
Date: 2012/6/28
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __client_entities_h
|
|
|
|
#define __client_entities_h
|
|
|
|
|
2022-03-04 16:48:10 +00:00
|
|
|
#include "QF/darray.h"
|
|
|
|
#include "QF/msg.h"
|
2012-06-28 00:33:23 +00:00
|
|
|
#include "QF/qtypes.h"
|
2022-03-04 16:48:10 +00:00
|
|
|
|
2021-03-11 07:19:49 +00:00
|
|
|
#include "QF/simd/types.h"
|
2012-06-28 00:33:23 +00:00
|
|
|
|
2022-03-04 16:48:10 +00:00
|
|
|
typedef struct entitystateset_s DARRAY_TYPE (struct entity_state_s)
|
|
|
|
entitystateset_t;
|
|
|
|
extern entitystateset_t cl_static_entities;
|
|
|
|
|
2012-06-28 10:18:14 +00:00
|
|
|
// entity_state_t is the information conveyed from the server
|
|
|
|
// in an update message
|
|
|
|
typedef struct entity_state_s {
|
|
|
|
int number; // edict index
|
|
|
|
unsigned flags; // nolerp, etc
|
|
|
|
|
2021-03-11 07:19:49 +00:00
|
|
|
vec4f_t origin;
|
|
|
|
vec4f_t velocity;
|
2012-06-28 10:18:14 +00:00
|
|
|
vec3_t angles;
|
2021-03-11 05:27:36 +00:00
|
|
|
uint16_t modelindex;
|
|
|
|
uint16_t frame;
|
|
|
|
int weaponframe;
|
2012-06-28 10:18:14 +00:00
|
|
|
int effects;
|
|
|
|
byte colormap;
|
|
|
|
byte skinnum;
|
|
|
|
|
|
|
|
// QSG 2
|
|
|
|
byte alpha;
|
|
|
|
byte scale;
|
|
|
|
byte glow_size;
|
|
|
|
byte glow_color;
|
|
|
|
byte colormod;
|
|
|
|
} entity_state_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
entity_state_t * const baseline;
|
|
|
|
entity_state_t * const * const frame;
|
2012-07-01 02:36:47 +00:00
|
|
|
const int num_frames;
|
|
|
|
const int num_entities;
|
2012-06-28 10:18:14 +00:00
|
|
|
} entstates_t;
|
|
|
|
|
|
|
|
extern entstates_t nq_entstates;
|
|
|
|
extern entstates_t qw_entstates;
|
|
|
|
|
2012-06-28 00:33:23 +00:00
|
|
|
extern vec3_t ent_colormod[256];
|
|
|
|
|
2021-03-10 09:00:16 +00:00
|
|
|
struct entity_s;
|
2021-03-19 11:18:45 +00:00
|
|
|
void CL_TransformEntity (struct entity_s *ent, float scale,
|
|
|
|
const vec3_t angles, vec4f_t position);
|
2021-03-10 09:00:16 +00:00
|
|
|
|
2012-06-28 00:33:23 +00:00
|
|
|
#endif//__client_entities_h
|