diff --git a/grenades/frag/README.md b/grenades/frag/README.md index 0529ab3..5bea3e9 100644 --- a/grenades/frag/README.md +++ b/grenades/frag/README.md @@ -6,4 +6,10 @@ * Approximately +1000 velocity in the direction of the player's current velocity ### While standing still -* Approximately +950 velocity straight up \ No newline at end of file +* Approximately +950 velocity straight up + +## Damage and radius + +* At origin: 162 +* Radius: ~368 from origin (note: not from edge of player hitbox) +* Falloff: 0 damage at edge of radius \ No newline at end of file diff --git a/grenades/mirv/README.md b/grenades/mirv/README.md new file mode 100644 index 0000000..24e64dc --- /dev/null +++ b/grenades/mirv/README.md @@ -0,0 +1,8 @@ +# MIRV Grenade + +## Damage and radius + +* At origin: 162 +* Radius: ~368 from origin (note: not from edge of player hitbox) +* Falloff: 0 damage at edge of radius +* Both the MIRV and MIRVlets do the same damage and have the same radius \ No newline at end of file diff --git a/plugins/test_gren.sma b/plugins/test_gren.sma index 51e7cff..bb5fc74 100644 --- a/plugins/test_gren.sma +++ b/plugins/test_gren.sma @@ -6,6 +6,7 @@ #define AUTHOR "squeek." #define TEST_GREN_TARGET_CVAR "test_gren_target" +#define TEST_GREN_RADIUS_CVAR "test_gren_radius" public plugin_init() { @@ -13,11 +14,15 @@ public plugin_init() register_think("tf_weapon_normalgrenade", "gren_think") register_cvar(TEST_GREN_TARGET_CVAR, "1") + register_cvar(TEST_GREN_RADIUS_CVAR, "0") } // teleport grenades to the origin of the target public gren_think(gren_id) { + if (get_cvar_num(TEST_GREN_TARGET_CVAR) < 0) + return + teleport_ent_to_ent(gren_id, get_cvar_num(TEST_GREN_TARGET_CVAR)) static Float:zero_velocity[3] = {0.0} entity_set_vector(gren_id, EV_VEC_velocity, zero_velocity) @@ -31,5 +36,6 @@ public teleport_ent_to_ent(ent_id, target_id) static Float:target_origin[3] entity_get_vector(target_id, EV_VEC_origin, target_origin) + target_origin[0] = target_origin[0] + get_cvar_num(TEST_GREN_RADIUS_CVAR) entity_set_vector(ent_id, EV_VEC_origin, target_origin) } \ No newline at end of file diff --git a/plugins/test_mirv.sma b/plugins/test_mirv.sma new file mode 100644 index 0000000..b1d2434 --- /dev/null +++ b/plugins/test_mirv.sma @@ -0,0 +1,42 @@ +#include +#include + +#define PLUGIN "Test Mirvs" +#define VERSION "0.1" +#define AUTHOR "squeek." + +#define TEST_MIRV_TARGET_CVAR "test_mirv_target" +#define TEST_MIRV_RADIUS_CVAR "test_mirv_radius" + +public plugin_init() +{ + register_plugin(PLUGIN, VERSION, AUTHOR) + register_think("tf_weapon_mirvgrenade", "gren_think") + register_think("tf_weapon_mirvbomblet", "gren_think") + + register_cvar(TEST_MIRV_TARGET_CVAR, "1") + register_cvar(TEST_MIRV_RADIUS_CVAR, "0") +} + +// teleport grenades to the origin of the target +public gren_think(gren_id) +{ + if (get_cvar_num(TEST_MIRV_TARGET_CVAR) < 0) + return + + teleport_ent_to_ent(gren_id, get_cvar_num(TEST_MIRV_TARGET_CVAR)) + static Float:zero_velocity[3] = {0.0} + entity_set_vector(gren_id, EV_VEC_velocity, zero_velocity) +} + +// move entity to the origin of the target +public teleport_ent_to_ent(ent_id, target_id) +{ + if (!is_valid_ent(target_id) || !is_valid_ent(ent_id)) + return + + static Float:target_origin[3] + entity_get_vector(target_id, EV_VEC_origin, target_origin) + target_origin[0] = target_origin[0] + get_cvar_num(TEST_MIRV_RADIUS_CVAR) + entity_set_vector(ent_id, EV_VEC_origin, target_origin) +} \ No newline at end of file diff --git a/plugins/test_rpg_radius.sma b/plugins/test_rpg_radius.sma new file mode 100644 index 0000000..5a7405f --- /dev/null +++ b/plugins/test_rpg_radius.sma @@ -0,0 +1,41 @@ +#include +#include + +#define PLUGIN "Test RPG Radius" +#define VERSION "0.1" +#define AUTHOR "squeek." + +#define TEST_RPG_TARGET_CVAR "test_rpg_radius_target" +#define TEST_RPG_RADIUS_CVAR "test_rpg_radius" + +public plugin_init() +{ + register_plugin(PLUGIN, VERSION, AUTHOR) + register_touch("tf_rpg_rocket", "*", "rocket_touch") + + register_cvar(TEST_RPG_TARGET_CVAR, "1") + register_cvar(TEST_RPG_RADIUS_CVAR, "0") +} + +// teleport grenades to the origin of the target +public rocket_touch(gren_id) +{ + if (get_cvar_num(TEST_RPG_TARGET_CVAR) < 0) + return + + teleport_ent_to_ent(gren_id, get_cvar_num(TEST_RPG_TARGET_CVAR)) + static Float:zero_velocity[3] = {0.0} + entity_set_vector(gren_id, EV_VEC_velocity, zero_velocity) +} + +// move entity to the origin of the target +public teleport_ent_to_ent(ent_id, target_id) +{ + if (!is_valid_ent(target_id) || !is_valid_ent(ent_id)) + return + + static Float:target_origin[3] + entity_get_vector(target_id, EV_VEC_origin, target_origin) + target_origin[0] = target_origin[0] + get_cvar_num(TEST_RPG_RADIUS_CVAR) + entity_set_vector(ent_id, EV_VEC_origin, target_origin) +} \ No newline at end of file diff --git a/weapons/pl/README.md b/weapons/pl/README.md index 4b62025..99f73c7 100644 --- a/weapons/pl/README.md +++ b/weapons/pl/README.md @@ -14,4 +14,4 @@ All damage data was measured with the exploding at a crouched player's origin ex * Average: ~80 ### Misc -* Damage radius: ~120 units \ No newline at end of file +* Damage radius: ~120 units (~136 from the origin) \ No newline at end of file diff --git a/weapons/rpg/README.md b/weapons/rpg/README.md index e2af491..c1219be 100644 --- a/weapons/rpg/README.md +++ b/weapons/rpg/README.md @@ -16,5 +16,9 @@ All damage data was measured with the rocket exploding at the player's origin ex #### Damage frequency ![Chart: Frequency of RPG Damage at Player Origin](graphics/damage_frequency.png) +#### Radius +* Radius: ~125 from origin max (note: not from edge of player hitbox) +* Radius also seems to vary based on the randomness of the damage, and seems to do about half damage at the edge of its radius + ### Misc * Projectile Speed: 900 \ No newline at end of file