~melchizedek6809/WolkenWelten

19a5ae3cc7ddc83c7cd41598efcaf8af9dfff1f7 — Ben (X13/Arch) 7 months ago 18b6752
Increased melee range for chars/animals
3 files changed, 5 insertions(+), 4 deletions(-)

M client/src/game/character.c
M common/src/animals/bunny.c
M common/src/animals/werebunny.c
M client/src/game/character.c => client/src/game/character.c +3 -2
@@ 290,10 290,11 @@ void characterHit(character *c){
	item *itm = &c->inventory[c->activeItem];
	iteration--;

	const float range = 4.f;
	const vec pos = vecAdd(c->pos,vecDegToVec(c->rot));
	const being source = beingCharacter(playerID);
	characterHitCheck(pos,2.f,itemGetDamage(itm,0),2,iteration, source);
	animalHitCheck   (pos,2.f,itemGetDamage(itm,0),2,iteration, source);
	characterHitCheck(pos,range,itemGetDamage(itm,0),2,iteration, source);
	animalHitCheck   (pos,range,itemGetDamage(itm,0),2,iteration, source);

	characterStartAnimation(c,animationHit,240);
	characterAddCooldown(c,80);

M common/src/animals/bunny.c => common/src/animals/bunny.c +1 -1
@@ 174,7 174,7 @@ static void bunnyFightOrFlight(animal *e,int stateChange[16]){
			const vec tpos = beingGetPos(e->target);
			const float dist = vecMag(vecSub(tpos,e->pos));

			if((dist < 1.5f) && (rngValA(7)==0)){
			if((dist < 3.f) && (rngValA(3)==0)){
				int dmg = 1;
				if(rngValM(8)==0){dmg = 4;}
				beingDamage(e->target,dmg,2,1.f,animalGetBeing(e),e->pos);

M common/src/animals/werebunny.c => common/src/animals/werebunny.c +1 -1
@@ 96,7 96,7 @@ static void werebunnySHunt(animal *e,int stateChange[16]){
		const vec tpos = beingGetPos(e->target);
		const float dist = vecMag(vecSub(tpos,e->pos));

		if(dist < 2.f){
		if(dist < 4.f){
			int dmg = 1;
			if(rngValM(8)==0){dmg = 4;}
			beingDamage(e->target,dmg,2,1.f,animalGetBeing(e),e->pos);