add refactoring info

This commit is contained in:
alison wright 2019-09-17 11:23:21 -04:00
parent 35e64ea09f
commit bd05a9b762
4 changed files with 90 additions and 70 deletions

View File

@ -1,24 +1,5 @@
// client.qc: player-adjacent functions
void() player_axe1;
void() player_axeb1;
void() player_axec1;
void() player_axed1;
void() player_die_ax1;
void() player_diea1;
void() player_dieb1;
void() player_diec1;
void() player_died1;
void() player_diee1;
void() player_light1;
void() player_nail1;
void() player_pain;
void() player_rocket1;
void() player_run;
void() player_run;
void() player_shot1;
void() player_stand1;
/*
=============================================================================

View File

@ -641,9 +641,12 @@ void() SUB_UseTargets;
void() SUB_Remove;
// combat.qc
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
float(entity e, float healamount, float ignore) T_Heal; // health function
float(entity targ, entity inflictor) CanDamage;
void() T_MissileTouch;
void(entity bomb, entity attacker, float rad, entity ignore) T_RadiusDamage;
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
// weapons.qc
void() W_FireAxe;
@ -655,11 +658,24 @@ void() W_FireGrenade;
void(float ox) W_FireSpikes;
void() W_FireSuperSpikes;
float() W_BestWeapon;
void() W_SetCurrentAmmo;
void() W_WeaponFrame;
void() army_fire;
float() DemonCheckAttack;
void() Demon_JumpTouch;
void(float side) Demon_Melee;
float() DogCheckAttack;
void() dog_leap1;
void() dog_run1;
void() ShalHome;
void() ShalMissile;
void() ShalMissileTouch;
float() crandom;
float() DemonCheckAttack;
float() DogCheckAttack;
float() WizardCheckAttack;
float(entity targ) infront;
float(entity targ) range;
float(entity targ) visible;
@ -667,25 +683,14 @@ float(entity targ, entity attacker) SameTeam;
float(float v) anglemod;
void() DecodeLevelParms;
void(entity ent) CopyToBodyQue;
void() Demon_JumpTouch;
void() InitBodyQue;
void() PlayerDie;
void() ShalHome;
void() ShalMissile;
void() ShalMissileTouch;
void() SuperDamageSound;
void() T_MissileTouch;
void() W_SetCurrentAmmo;
void() W_WeaponFrame;
void() ai_face;
void() armor_touch;
void() army_fire;
void() bubble_bob;
void() bubble_remove;
void() button_return;
void() button_wait;
void() dog_leap1;
void() dog_run1;
void() door_go_down;
void() door_go_up;
void() fd_secret_done;
@ -701,58 +706,88 @@ void() finale_3;
void() finale_4;
void() fire_fly;
void() fire_touch;
void() func_train_find;
void() health_touch;
void() hk_idle_sound;
void() hknight_char_a1;
void() hknight_run1;
void() info_player_start;
void() item_megahealth_rot;
void() knight_atk1;
void() knight_bow1;
void() knight_bow6;
void() knight_runatk1;
void() knight_walk1;
void() make_bubbles;
void() monster_death_use;
void() movetarget_f;
void() powerup_touch;
void() set_suicide_frame;
void(vector org, vector dir) launch_spike;
void() spike_touch;
void() superspike_touch;
void() swimmonster_start;
void() t_movetarget;
void() train_next;
void(entity targ, entity attacker) ClientObituary;
void(float num_bubbles) DeathBubbles;
void(vector dest) ChooseTurn;
void(vector org, vector vec) LaunchLaser;
void(vector org, vector vel, float damage) SpawnBlood;
void() BecomeExplosion;
void() hknight_char_a1;
void() hknight_run1;
void() ogre_smash1;
void() ogre_swing1;
void() plat_center_touch;
void() plat_crush;
void() plat_go_down;
void() plat_go_up;
void() plat_outside_touch;
void() plat_trigger_use;
void() powerup_touch;
void() set_suicide_frame;
void() knight_atk1;
void() knight_bow1;
void() knight_bow6;
void() knight_runatk1;
void() knight_walk1;
void() PlayerDie;
void() player_axe1;
void() player_axeb1;
void() player_axec1;
void() player_axed1;
void() player_die_ax1;
void() player_diea1;
void() player_dieb1;
void() player_diec1;
void() player_died1;
void() player_diee1;
void() player_light1;
void() player_nail1;
void() player_pain;
void() player_rocket1;
void() player_run;
void() player_run;
void() player_shot1;
void() player_stand1;
void() sham_smash1;
void(vector org, vector dir) launch_spike;
void() sham_swingl1;
void() sham_swingr1;
void() sham_swingr1;
void() spike_touch;
void() superspike_touch;
void() swimmonster_start;
void() t_movetarget;
void() tbaby_jump1;
void() tbaby_jump5;
void() train_next;
float() WizardCheckAttack;
void() wiz_run1;
void() wiz_side1;
void(entity bomb, entity attacker, float rad, entity ignore) T_RadiusDamage;
void(entity targ, entity attacker) ClientObituary;
void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
void(float num_bubbles) DeathBubbles;
void(float side) Demon_Melee;
void(vector dest) ChooseTurn;
void(vector org, vector vec) LaunchLaser;
void(vector org, vector vel, float damage) SpawnBlood;
void() BecomeExplosion;
void(vector org) spawn_tfog;
void(vector org, entity death_owner) spawn_tdeath;
void() info_player_start;
void() func_train_find;
void(vector p) boss_missile;
// EOF

View File

@ -45,6 +45,11 @@ $frame w_attack21 w_attack22
$frame magicc1 magicc2 magicc3 magicc4 magicc5 magicc6 magicc7 magicc8
$frame magicc9 magicc10 magicc11
void() hknight_idle_sound = {
if(random() < 0.2) {
sound(self, CHAN_VOICE, "hknight/idle.wav", 1, ATTN_NORM);
}
};
void(float offset) hknight_shot = {
local vector offang;
@ -118,7 +123,7 @@ void() hknight_stand9 = [ $stand9, hknight_stand1 ] {ai_stand();};
//===========================================================================
void() hknight_walk1 = [ $walk1, hknight_walk2 ] {
hk_idle_sound();
hknight_idle_sound();
ai_walk(2);
};
void() hknight_walk2 = [ $walk2, hknight_walk3 ] {ai_walk(5);};
@ -144,7 +149,7 @@ void() hknight_walk20 = [ $walk20, hknight_walk1 ] {ai_walk(2);};
//===========================================================================
void() hknight_run1 = [ $run1, hknight_run2 ] {
hk_idle_sound();
hknight_idle_sound();
ai_run(20);
CheckForCharge();
};
@ -342,12 +347,6 @@ void() hknight_watk22 = [ $w_attack22, hknight_run1 ] {ai_charge(3);};
//============================================================================
void() hk_idle_sound = {
if(random() < 0.2) {
sound(self, CHAN_VOICE, "hknight/idle.wav", 1, ATTN_NORM);
}
};
void(entity attacker, float damage) hknight_pain = {
if(self.pain_finished > time) {
return;

5
todo
View File

@ -1,3 +1,8 @@
refactoring:
add expansion pack entities
rename all functions to be lower_underscore
core features:
custom pronouns