tryin to implement second attack skill, but i`ve run into problem...
the mud crashes and dumps core after seemingly random amount
of time saying :
memory fault ...
i aint a wiz with the utilities that examine the core, but here is the =
=20
code that i know
is causing the crash as when i take it out it dont crash anymore :
in fight.c
in perform_violence()
after if(get_pos(ch) < pos_fighting) {
blah;
}
i added :
=20
+ if (!IS_NPC(ch) && GET_POS(FIGHTING(ch)) >=3D POS_FIGHTING) {
+ if (GET_SKILL(ch,SKILL_SEC_ATTACK) > 0) {
+ if (number(1,101) < GET_SKILL(ch,SKILL_SEC_ATTACK)) {
+ hit(ch,FIGHTING(ch),TYPE_UNDEFINED);
+ }
+ }
+ }
right before
hit(ch,FIGHTING(ch),TYPE_UNDEFINED)
so as to make the character hit twice if it is not an npc and has the =20=
second attack skill...
can anyone suggest if there is a reason for not putting code inside the =
=20
heartbeat functions
(for example if doing so screws up memory usage etc?) ... i`m at a bit o=
f =20
a loss
thanks in advance...
-CJB
"gimme de beer" =20
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST