fix assign-function-types issues

This commit is contained in:
alison wright 2019-09-17 12:30:40 -04:00
parent f48bed0dc8
commit be812d4308
9 changed files with 23 additions and 22 deletions

View File

@ -1,7 +1,7 @@
[flags]
ADJUST_VECTOR_FIELDS = true
ARITHMETIC_EXCEPTIONS = true
ASSIGN_FUNCTION_TYPES = true
ASSIGN_FUNCTION_TYPES = false
BAIL_ON_WERROR = true
CORRECT_LOGIC = true
CORRECT_TERNARY = true
@ -35,9 +35,8 @@
VARIADIC_ARGS = true
[warnings]
ALL = true
ASSIGN_FUNCTION_TYPES = false
USED_UNINITIALIZED = false
ALL = true
USED_UNINITIALIZED = false
[optimizations]
PEEPHOLE = true

View File

@ -19,19 +19,19 @@ source/triggers.qc
source/weapons.qc
source/world.qc
source/ogre.qc
source/boss.qc
source/demon.qc
source/shambler.qc
source/dog.qc
source/knight.qc
source/ogre.qc
source/shambler.qc
source/soldier.qc
source/wizard.qc
source/dog.qc
source/zombie.qc
source/boss.qc
source/tarbaby.qc
source/hknight.qc
source/fish.qc
source/shalrath.qc
source/enforcer.qc
source/fish.qc
source/hknight.qc
source/oldone.qc
source/shalrath.qc
source/tarbaby.qc

View File

@ -637,6 +637,7 @@ void() SUB_CalcMoveDone;
void() SUB_CalcAngleMoveDone;
void(void() thinkst) SUB_CheckRefire;
void() SUB_Null;
void(entity attacker, float damage) SUB_PainNull;
void() SUB_UseTargets;
void() SUB_Remove;
@ -762,7 +763,7 @@ void() player_died1;
void() player_diee1;
void() player_light1;
void() player_nail1;
void() player_pain;
void(entity attacker, float damage) player_pain;
void() player_rocket1;
void() player_run;
void() player_run;

View File

@ -188,7 +188,7 @@ void() dog_painb14 = [ $painb14, dog_painb15 ] {};
void() dog_painb15 = [ $painb15, dog_painb16 ] {};
void() dog_painb16 = [ $painb16, dog_run1 ] {};
void() dog_pain = {
void(entity attacker, float damage) dog_pain = {
sound(self, CHAN_VOICE, "dog/dpain1.wav", 1, ATTN_NORM);
if(random() > 0.5) {

View File

@ -534,7 +534,7 @@ void() fd_secret_use = {
SUB_UseTargets(); // fire all targets / killtargets
if(!(self.spawnflags & SECRET_NO_SHOOT)) {
self.th_pain = SUB_Null;
self.th_pain = SUB_PainNull;
self.takedamage = DAMAGE_NO;
}
self.velocity = '0 0 0';
@ -569,6 +569,7 @@ void() fd_secret_use = {
SUB_CalcMove(self.dest1, self.speed, fd_secret_move1);
sound(self, CHAN_VOICE, self.noise2, 1, ATTN_NORM);
};
void(entity attacker, float damage) fd_secret_pain = {fd_secret_use();};
// Wait after first movement...
void() fd_secret_move1 = {
@ -614,7 +615,7 @@ void() fd_secret_done = {
if(!self.targetname || self.spawnflags & SECRET_YES_SHOOT) {
self.health = 10000;
self.takedamage = DAMAGE_YES;
self.th_pain = fd_secret_use;
self.th_pain = fd_secret_pain;
}
sound(self, CHAN_VOICE, self.noise3, 1, ATTN_NORM);
};
@ -714,7 +715,7 @@ void() func_door_secret = {
if(!self.targetname || self.spawnflags & SECRET_YES_SHOOT) {
self.health = 10000;
self.takedamage = DAMAGE_YES;
self.th_pain = fd_secret_use;
self.th_pain = fd_secret_pain;
self.th_die = fd_secret_use;
}
self.oldorigin = self.origin;

View File

@ -220,7 +220,7 @@ void() finale_4 = {
//============================================================================
void() nopain = {
void(entity attacker, float damage) old_pain = {
self.health = 40000;
};
@ -251,7 +251,7 @@ void() monster_oldone = {
self.think = old_idle1;
self.nextthink = time + 0.1;
self.takedamage = DAMAGE_YES;
self.th_pain = nopain;
self.th_pain = old_pain;
self.th_die = finale_1;
shub = self;

View File

@ -317,7 +317,7 @@ void() player_axpain4 = [ $axpain4, player_axpain5 ] {};
void() player_axpain5 = [ $axpain5, player_axpain6 ] {};
void() player_axpain6 = [ $axpain6, player_run ] {};
void() player_pain = {
void(entity attacker, float damage) player_pain = {
if(self.weaponframe) {
return;
}

View File

@ -83,7 +83,7 @@ void() shal_death5 = [ $death5, shal_death6 ] {};
void() shal_death6 = [ $death6, shal_death7 ] {};
void() shal_death7 = [ $death7, shal_death7 ] {};
void() shalrath_pain = {
void(entity attacker, float damage) shalrath_pain = {
if(self.pain_finished > time) {
return;
}

View File

@ -1,7 +1,7 @@
// subs.qc: subroutines for think frames
void() SUB_Null = {};
void(entity attacker, float damage) SUB_PainNull = {};
void() SUB_Remove = {remove(self);};
/*