If you're not familiar with C++ concepts, I think it might be a little hard to grasp. I think it was my lack of experience at work.
I defined a macro "#define niftyword(param, param2, param3)" and used it almost, but not quite, like a function. What I forgot was that if I use the same symbol for param and param2, they will be
exactly the same, rather than two copies of the same value, or two pointers to the same location. Thus, when I assigned NULL to param2 and then tried to read data contained in the first parameter (param), the first parameter was NULL and could not be used; zdoom.exe crash.
Fixed.
By the way, I have a complete build of all my modifications ready. It only differs from existing suggestions in some A_JumpIfTargetInLOS details:
* JLOSF_NOTEAMNOJUMP is removed. All monsters on teams have FRIENDLY, so you can use A_CheckFlag for that.
* JLOSF_COMBATANTONLY is added. Using this will prevent jump for actors that aren't either players or monsters (ISMONSTER).
I'd post it, but by this time I'm not sure where. It encompasses all 3 suggestions I have made, contains an improvement that depends on all 3 submissions being accepted (excluding NOTEAMNOJUMP) and has a Strife weapons mod for demonstration and entertainment. Only two weapons properly use the new features, though.
Punch dagger
Fire: Regular attack
Altfire: Slow double damage attack. If you manage to stay on a bleeding monster that doesn't catch you in its field of view, you deal 5x damage.
(Damage increase is achieved through multiple 0-tic calls to A_JabDagger)
Missile launcher
Fire: Regular attack
Altfire: Try to find a target within field of view or perfect aim and make adjust course for it after a few tics. Semi-seeking missile. Cool, and not always better than a straight shot, but often much easier to get your target. Reduces the impact of low accuracy early in game.
I'll post the lot here for now, just to let people have a look and feel at it.
Spoiler: Weapons overview
Punch dagger and missile launcher are roughly as described above. Many projectiles have increased speed, making them easier to aim and slightly more deadly. Grenades also gain increased range from this speed increase, since gravity tends to bring them down.
Crossbows: Altfire readies the bow for a precise shot; repeat altfire to perform the precise shot. Precision gain only applies at low/very low speeds. Crossbow state is not maintained when moving between maps or changing weapons; if it was ready, it must be readied again.
Assault gun: Altfire fires at reduced rate with full accuracy. Has proven excellent for taking out targets from cover because you can track your puffs shot by shot until you find your target.
Grenade launcher: No longer fires double shots automatically. Alternates barrels as long as you hold fire. Main fire starts with right barrel, altfire starts with left barrel.
Flamethrower: No changes (well, I might have meddled with the flame translucency, but I don't think I achieved much. They still seem damned solid, so those changes might not be worth anything).
Mauler: Reduced ammo consumption for the shitty shot. Added primary weapon altfire that vaguely resembles the assault gun in its performance, although it is not affected by accuracy. Sister weapon recoloured to make the visual distinction more obvious. Added sister weapon altfire that executes very low damage hitscans in rapid succession with perfect aim.
Game balance: This mod makes the game very easy. It needs a counterpart in the monster department.
EDIT: Files removed.
Preferred patch: http://forum.zdoom.org/viewtopic.php?f=34&t=29364
If you're not familiar with C++ concepts, I think it might be a little hard to grasp. I think it was my lack of experience at work.
I defined a macro "#define niftyword(param, param2, param3)" and used it almost, but not quite, like a function. What I forgot was that if I use the same symbol for param and param2, they will be [i]exactly[/i] the same, rather than two copies of the same value, or two pointers to the same location. Thus, when I assigned NULL to param2 and then tried to read data contained in the first parameter (param), the first parameter was NULL and could not be used; zdoom.exe crash.
Fixed.
By the way, I have a complete build of all my modifications ready. It only differs from existing suggestions in some A_JumpIfTargetInLOS details:
* JLOSF_NOTEAMNOJUMP is removed. All monsters on teams have FRIENDLY, so you can use A_CheckFlag for that.
* JLOSF_COMBATANTONLY is added. Using this will prevent jump for actors that aren't either players or monsters (ISMONSTER).
I'd post it, but by this time I'm not sure where. It encompasses all 3 suggestions I have made, contains an improvement that depends on all 3 submissions being accepted (excluding NOTEAMNOJUMP) and has a Strife weapons mod for demonstration and entertainment. Only two weapons properly use the new features, though.
Punch dagger
Fire: Regular attack
Altfire: Slow double damage attack. If you manage to stay on a bleeding monster that doesn't catch you in its field of view, you deal 5x damage.
(Damage increase is achieved through multiple 0-tic calls to A_JabDagger)
Missile launcher
Fire: Regular attack
Altfire: Try to find a target within field of view or perfect aim and make adjust course for it after a few tics. Semi-seeking missile. Cool, and not always better than a straight shot, but often much easier to get your target. Reduces the impact of low accuracy early in game.
I'll post the lot here for now, just to let people have a look and feel at it.[spoiler=Weapons overview]Punch dagger and missile launcher are roughly as described above. Many projectiles have increased speed, making them easier to aim and slightly more deadly. Grenades also gain increased range from this speed increase, since gravity tends to bring them down.
Crossbows: Altfire readies the bow for a precise shot; repeat altfire to perform the precise shot. Precision gain only applies at low/very low speeds. Crossbow state is not maintained when moving between maps or changing weapons; if it was ready, it must be readied again.
Assault gun: Altfire fires at reduced rate with full accuracy. Has proven excellent for taking out targets from cover because you can track your puffs shot by shot until you find your target.
Grenade launcher: No longer fires double shots automatically. Alternates barrels as long as you hold fire. Main fire starts with right barrel, altfire starts with left barrel.
Flamethrower: No changes (well, I might have meddled with the flame translucency, but I don't think I achieved much. They still seem damned solid, so those changes might not be worth anything).
Mauler: Reduced ammo consumption for the shitty shot. Added primary weapon altfire that vaguely resembles the assault gun in its performance, although it is not affected by accuracy. Sister weapon recoloured to make the visual distinction more obvious. Added sister weapon altfire that executes very low damage hitscans in rapid succession with perfect aim.
Game balance: This mod makes the game very easy. It needs a counterpart in the monster department.[/spoiler]
EDIT: Files removed. [b]Preferred patch: http://forum.zdoom.org/viewtopic.php?f=34&t=29364[/b]