mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-05-02 21:35:11 +01:00
Don't use role mon as youmonst.data, use race mon addled by mtemplate of youmonst. what will the consequences of this be???
This commit is contained in:
parent
21036ecc52
commit
549ad5169d
3 changed files with 3 additions and 3 deletions
|
@ -252,7 +252,7 @@ extern const struct Race races[]; /* Table of available races */
|
|||
extern struct Race urace;
|
||||
#define Race_if(X) (urace.malenum == (X))
|
||||
#define Race_switch (urace.malenum)
|
||||
#define youracedata (maybe_polyd(youmonst.data, &mons[urace.malenum]))
|
||||
#define youracedata (youmonst.data)
|
||||
#define Humanoid_half_dragon(role) (Role_if(PM_MADMAN) || (Role_if(PM_NOBLEMAN) && flags.initgend))
|
||||
|
||||
/*** Unified structure specifying gender information ***/
|
||||
|
|
|
@ -74,7 +74,7 @@ int mtyp;
|
|||
struct permonst * ptr;
|
||||
/* players in their base form are a very special case */
|
||||
if (mon == &youmonst && (mtyp == u.umonster)) {
|
||||
ptr = &upermonst;
|
||||
ptr = permonst_of(mtyp, get_template(mon));
|
||||
/* I'm not sure what bas should be, if it were to be needed */
|
||||
}
|
||||
/* horrors are a special case, and have memory allocated on a per-monster basis */
|
||||
|
|
|
@ -33,7 +33,7 @@ init_uasmon()
|
|||
void
|
||||
set_uasmon()
|
||||
{
|
||||
set_mon_data(&youmonst, u.umonnum);
|
||||
set_mon_data(&youmonst, (flags.female && urace.femalenum != NON_PM) ? urace.femalenum : urace.malenum);
|
||||
}
|
||||
|
||||
/** Returns true if the player monster is genocided. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue