-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectile.h
34 lines (25 loc) · 951 Bytes
/
projectile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef PROJECTILE_H
#define PROJECTILE_H
#include <stdint.h>
#include "include/raylib.h"
#include "player.h"
#include "weapon.h"
#define MAX_GRENADE_DAMAGE_DISTANCE 250.0
typedef struct Projectile {
float pos_x;
float pos_y;
float angle;
float speed;
uint8_t size;
uint16_t damage;
uint16_t num_frames_existed;
ProjectileType projectile_type;
uint64_t shot_by;
uint64_t shot_by_team;
} Projectile;
void update_projectiles(Projectile** projectiles, uint16_t* num_projectiles, Player* players, uint8_t num_players, const Map* map, GameModeData* game_mode_data);
void use_weapons(Player* players, uint8_t num_players, Projectile** projectiles, uint16_t* num_projectiles);
uint8_t get_ammo_count(Weapon weapon);
void add_kill(Player* players, uint8_t num_players, Player* player_who_died);
void damage_player(Player* players, uint8_t num_players, Player* player_who_took_damage, uint64_t attacking_player_id, uint16_t damage);
#endif