Commit graph

347 commits

Author SHA1 Message Date
Christoph Oelckers
46024398fe - fixed: Change FCheckPosition::LastRipped to a TMap so that it can track multiple overlapping actors being ripped during the same tic. 2016-01-30 22:06:04 +01:00
Christoph Oelckers
7b1fbe0a02 - fixed: P_TeleportMove was missing checks for THRUACTORS and THRUSPECIES flags. 2016-01-29 11:29:47 +01:00
Randy Heit
87dee5c611 Fixed: Co-op players could spawn at (0,0) if no start spots for them
- Check if a co-op start exists. If not, pick one at random.
- Don't telefrag other players when spawning in co-op games, since
  you're allowed to move out of other players now.
2016-01-28 20:08:09 -06:00
Christoph Oelckers
03d7418f51 - fixed: Since sector movement is done after P_PlayerThink is called, any player position change induced by this is not factored into player_t::viewz and needs to be added explicitly.
This fixes the infamous 'view squats down a bit when riding up an elevator' effect. It is also there in the other cases but far less pronounced.
2016-01-21 10:23:20 +01:00
Christoph Oelckers
35271187a5 - took care of the rest of p_map.cpp. 2016-01-20 13:48:05 +01:00
Christoph Oelckers
500bc2b852 - fixed two refactoring errors:
* A_BridgeOrbit had its radius as an int, not a fixed_t.
* PIT_CheckThing used the wrong coordinate for checking actor distance.
2016-01-20 11:39:41 +01:00
Christoph Oelckers
7ea3e49332 - refactored p_mobj.cpp and the first half of p_map.cpp. 2016-01-20 01:48:57 +01:00
Christoph Oelckers
43314f0c0d - started refactoring p_map.cpp
- added AActor::Top function to replace the frequent occurences of actor->z + actor->height.
2016-01-18 00:59:16 +01:00
Christoph Oelckers
87689d3ba6 - global search&replace of ZatPoint calls with commonly named actor variables. 2016-01-17 14:08:20 +01:00
MajorCooke
421dcacb94 Added NULL check to lines. 2016-01-16 16:36:42 -06:00
MajorCooke
e4a74e91fc - Puffs should not spawn on floors or ceilings with sky flats without the SKYEXPLODE flag.
- Added line horizon check for puffs as well.
2016-01-16 16:33:19 -06:00
Christoph Oelckers
0e645ad173 - added a 'non-modify' mode to P_TeleportMove and let A_Respawn use that, rather than letting P_TeleportMove muck around with the actor properties and then have A_Respawn only partially and haphazardly restoring them afterward. 2016-01-16 16:30:53 +01:00
Christoph Oelckers
5a8062abba - fixed copy/paste error in secmovefac. (It returned friction instead of movefactor...) 2016-01-16 09:05:46 +01:00
MajorCooke
dd9e7560c4 Added support for puffs to spawn on floors and ceilings if ALWAYSPUFF is used. 2016-01-14 11:21:08 -06:00
Christoph Oelckers
2c0f64cf9f - refactoring of R_PointToAngle2 when used to calculate direction between two actors. 2016-01-10 20:46:26 +01:00
Christoph Oelckers
1e2ce9a622 - some refactoring of P_AproxDistance calls into newly defined AActor method AproxDistance.
The main reason here is to reduce the number of instances where AActor::x and AActor::y are being referenced.
2016-01-10 17:52:41 +01:00
Christoph Oelckers
71c7f2b42c - added 'floorterrain' and 'ceilingterrain' sector properties for UDMF. These will take precedence over texture based terrain if used.
'ceilingterrain' is needed because the top of 3D-floors refers to the model sector's ceiling, so in order to give a 3D floor a terrain it must be assignable to the sector's ceiling.
Note that although it is basically the same property, its actual function bears no relevance to its use in Eternity.
2016-01-09 12:10:36 +01:00
Christoph Oelckers
0b5e419593 - fixed friction logic for sectors.
Issues with the old code:
* when calculating friction for a 3D-floor - swimmable or not - the 3D floor's top texture must be used. The previous version always checked the sector's floor texture, even though the top might as well come from the sector's ceiling.
* 3D floors never checked for the SECF_FRICTION flag at all. According to Boom specs, sector-based friction must be ignored if this is the case.
* Terrain based friction had a higher priority than the sector's own value.

Changed the rules as follows:
* if the sector's SECF_FRICTION flag is set (i.e. something explicitly changed the sector's friction), this value is used regardless of terrain settings.
* if this flag is not set, the terrain's friction is used, if defined, using the proper plane for 3D-floors.
* otherwise the default is used.
2016-01-09 10:11:20 +01:00
Christoph Oelckers
3ffcec3eb3 - moved friction flag from special to Flags as well. 2016-01-06 02:01:59 +01:00
Christoph Oelckers
1ad02a6ce8 - allow specifying infighting through skills. 2015-11-29 12:10:12 +01:00
Edoardo Prezioso
6678c3550e - Improve the TFlags code and fix the new errors.
The previous version didn't detect some real mistakes in code which used operator& with the wrong flagset (for now 'converted' to the correcly equivalent counterpart, waiting for the proper fix).
2015-10-13 00:30:06 +02:00
Edward Richardson
389ff4fc98 Shift self-clip to first check for performance 2015-08-30 22:02:36 +12:00
Christoph Oelckers
1e4bec25c5 - fixed the distance check for unblocking overlapping monsters. It tested for half the radius as distance threshold when it should have used the full radius 2015-07-15 10:15:12 +02:00
Edward Richardson
2a69ae2a43 Change all float calcs in rails to doubles 2015-06-25 13:57:36 +12:00
Edward Richardson
8670b7ecf7 Use puff decal with MF7_FORCEDECAL 2015-06-25 12:53:46 +12:00
Christoph Oelckers
4444d3c0c5 - removed the _3DFLOOR #define because we really do not want to comment this out anymore, right? 2015-06-07 09:41:44 +02:00
Eevee (Alex Munroe)
a87a86198c Transfer friction to swimmable 3D floors. 2015-06-06 16:07:48 -07:00
Christoph Oelckers
84351419a3 Merge branch 'master' of https://github.com/crimsondusk/zdoom
Conflicts:
	src/actor.h
2015-04-30 10:03:50 +02:00
Christoph Oelckers
405fc31e81 Merge branch 'master' of https://github.com/DaZombieKiller/zdoom
Conflicts:
	src/actor.h
2015-04-30 09:14:31 +02:00
Christoph Oelckers
c6fe0835d3 - fixed: The check for unblocking overlapping actors was a bit too lax.
The code never checked the starting position of the move and could be erroneously triggered in rare situations where the distance increased between actors but the hit boxes started overlapping because x or y distance got below the radius.
Changed it so that the code only gets executed when there's already an overlap before the move.
2015-04-27 20:37:01 +02:00
Chronos Ouroboros
6a6836b1e7 Added SpiralOffset to railgun functions. 2015-04-23 15:11:54 -03:00
Teemu Piippo
ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Christoph Oelckers
0a16855232 - fixed: The assignment to the 'player' variable in P_DamageMobj occured too late, skipping a few cases.
- changed monster unblocking logic to include players as well (i.e. a player being stuck inside another actor is allowed to move away from that other actor.)
2015-04-02 10:05:32 +02:00
Christoph Oelckers
34aeb428a1 - Removed the check for this flag from P_RadiusAttack because MF7_CAUSEPAIN cannot be used for radius attacks. Their logic is too different from regular attacks. 2015-04-01 10:01:48 +02:00
Christoph Oelckers
375c0ac736 - cleanup of damage flag handling in P_RailAttack. 2015-03-27 10:10:22 +01:00
MajorCooke
f161c0c501 - Fixed: Projectile impacts never called P_DamageMobj when damage was 0 without the CAUSEPAIN flag. 2015-03-25 14:19:50 -05:00
Christoph Oelckers
cf579e4c77 - removed unused 'bombvec' variable from P_RadiusAttack. 2015-03-14 13:14:27 +01:00
MajorCooke
9a09fbd7ed Added MTHRUSPECIES support for rails and sprays. 2015-03-12 09:34:25 +01:00
Christoph Oelckers
123da68735 - took out the part of PIT_CheckThing that determines whether a missile should hurt its target and moved it to a separate function.
- fixed: MF7_HARMFRIENDS was checked on the victim of an attack, but needs to be checked on the shooter.
2015-03-02 10:02:49 +01:00
ZzZombo
c4b742ebf0 - Part 2 of the sanity crusade. 2015-02-08 17:03:49 +08:00
Benjamin Moir
6dff8da503 Added +NODECAL and +FORCEDECAL actor flags
Added FHF_NOIMPACTDECAL for LineAttack
2015-01-20 12:05:00 +10:30
Christoph Oelckers
c57cc91d7c - cleaned up the RipLevel logic a bit to be less confusing. 2014-12-31 10:13:15 +01:00
MajorCooke
4ddfd0f46a - Added 3 new properties and 3 functions to control them.
- Rippers will rip through anything with an equivalent ripper level, or if their level is between or on the min and max ranges.
- If no min or max is defined, it simply checks if the monster's ripper level is lower than the missiles.
- Functions: A_SetRipperLevel(int level), A_SetRipMin(int min), A_SetRipMax(int max)
- Properties: RipperLevel, RipLevelMin, and RipLevelMax.
- RipperLevel: Applicable to monsters and projectiles.
- RipLevelMin and RipLevelMax are only useful on monsters.
- By default, all are 0.
2014-12-30 19:59:31 -06:00
MajorCooke
519ff8b7d1 - HITTARGET/MASTER/TRACER now set the puff's pointer(s) within P_SpawnPuff.
- PUFFGETSOWNER, for the sake of compatibility, maintains override for target.
2014-12-27 14:15:54 -06:00
Randy Heit
e0667544d2 Clamp chase_dist and chase_height because integer overflow is a thing. 2014-12-26 15:15:42 -06:00
MajorCooke
62a4945ca4 - Fixed: CAUSEPAIN didn't work with A_Explode calls featuring no damage. 2014-12-23 23:30:00 -06:00
MajorCooke
31ad642843 - HITTARGET, HITMASTER and HITTRACER now apply to actors that bounce off of other actors. 2014-12-19 13:43:24 -06:00
MajorCooke
24f1bfae99 - Need to set it on the puff itself, not the defaults. 2014-12-16 12:48:52 -06:00
MajorCooke
fc05a3bb2f - Added HIT* flag detection for bullet and rail attacks. 2014-12-16 12:37:31 -06:00
MajorCooke
e5340ad637 - Splitting the pull request in half.
- Added THRUREFLECT, MIRRORREFLECT, and AIMREFLECT. All require REFLECTIVE to work.
- THRUREFLECT prevents missiles from changing course if reflected, and takes precedence over all reflective flags.
- MIRRORREFLECT causes missiles to perform a direct 180 turn-around.
- AIMREFLECT turns the missile back to the original shooter, and does not slow the missile down.
2014-12-09 12:09:36 -06:00