improve MGF video quality

This commit is contained in:
Ondřej Novák 2025-01-29 20:46:35 +01:00
parent 2be84e406c
commit f169aa5071
4 changed files with 86 additions and 5 deletions

View file

@ -85,6 +85,7 @@
#define get_string(t) texty[t]
static __inline unsigned int rnd(unsigned int max) {
if (max == 0) return 0;
return rand() % max;
}

View file

@ -745,7 +745,7 @@ void spell_hit(int cil,int min,int max,int owner)
cil--;
h=&postavy[cil];
vysl=min+rnd(max-min);
vysl=min+rnd(max-min+1);
if (vysl<0)
{
h->lives-=vysl>h->vlastnosti[VLS_MAXHIT]?h->vlastnosti[VLS_MAXHIT]:vysl;