Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug with weaponspeed patch
- To: crossfire (at) ifi.uio.no
- Subject: Bug with weaponspeed patch
- From: Moonchilde <>
- Date: Wed, 9 Sep 1992 17:27:45 -0400 (EDT)
- Sender: "Joseph L. Traub" <>
Here is the patch for truncating weapon speed at zero.
Before, a dagger + 4 would try to give a player a weaponspeed of -1
but since weaponspeed was an unsigned char, it wrapped and gave them a speed
of 255. I don't see any real reason for weapon speeds FASTER than bare hands,
so, here is the patch.
---JT
-------------------- cut here-----------------------------
*** living.c.old Wed Sep 9 17:07:23 1992
--- living.c Wed Sep 9 17:17:22 1992
***************
*** 69,75 ****
return 1;
if(tmp->type==WEAPON)
if(flag==1)
! op->contr->weapon_sp=(unsigned char)WEAPON_SPEED(tmp)-tmp->magic;
else
op->contr->weapon_sp=0;
if(tmp->stats.hp) {
--- 69,78 ----
return 1;
if(tmp->type==WEAPON)
if(flag==1)
! if(((int)WEAPON_SPEED(tmp) - (int)tmp->magic) > 0)
! op->contr->weapon_sp=(unsigned char)WEAPON_SPEED(tmp)-tmp->magic;
! else
! op->contr->weapon_sp = 0;
else
op->contr->weapon_sp=0;
if(tmp->stats.hp) {
------------------- cut here -----------------------------
-------------------------------------------------------------------------
Practice random kindness and senseless acts of beauty --Anonymous
Argue for your limitations and sure enough they're yours --Richard Bach
Moonchilde/Amythyst/JT Traub ---