Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightshade patch #163

Open
wants to merge 134 commits into
base: master
Choose a base branch
from

Conversation

zeluisping
Copy link
Contributor

Here's a list of changes:

  • Can no longer change mine while deploying/undeploying
  • Forced and new third person view while deployed
  • Arm rotation while deployed
  • State changing code improved
  • Beam damage type (fixes the bullet hit sound bug)
  • Added dust/water effects while uncloaked
  • Renamed Weap_UT3Nightshade to UT3Weap_NightshadeBeam
  • Beam gun no longer rotates while deployed

Fixed from #10:

  • Pressing jump button enters deploy mode which does work but doesn't seem you can aim like it is in UT3 (side to side)
  • While not invisible on UT3 it has Manta like dust blow under it, not in UT2004 though

Fixed from #125:

  • Impact sound of beam weapon is bullet impact sounds in UT2004, doesn't seem to really have an impact sound in UT3 that I can hear

GreatEmerald and others added 30 commits April 22, 2014 23:21
This should compile now

Signed-off-by: GreatEmerald <[email protected]>
Also added the last vehice files from UT3Style

Signed-off-by: GreatEmerald <[email protected]>
Scorpion's turret is a complete bust without chaning the bones, and the
SPMA turret must use the UT2004 system instead of trying to deviate.

Signed-off-by: GreatEmerald <[email protected]>
Also adjusted Manta driver seat height

Thanks to Parkis G for altering the mesh.

Signed-off-by: GreatEmerald <[email protected]>
Thanks to Parkis G for this one as well

Signed-off-by: GreatEmerald <[email protected]>
Thanks to Parkis G for the mesh adjustments

Signed-off-by: GreatEmerald <[email protected]>
Still needs debugging, though. Oh man, the difficult tasks of eliminating
hacks in the original...

Signed-off-by: GreatEmerald <[email protected]>
Mainly Scorpion driver position and Raptor rudder rotation contstraints

Signed-off-by: GreatEmerald <[email protected]>
Turrets are weirdly misaligned for some reason, hmm..

Signed-off-by: GreatEmerald <[email protected]>
Things like turret camera offset, exploits where you can fire while
deploying, disabling the headlight, getting the volumes right and all that.

Signed-off-by: GreatEmerald <[email protected]>
Small stuff, like entry radii, skins, projectiles shooting from the right
place and not hurting self etc.

Signed-off-by: GreatEmerald <[email protected]>
Now it's less wacky, you can only boost if you have enough speed and are on
the ground, the effects are sorted out, and self-destruct now really no
longer harms you.

Signed-off-by: GreatEmerald <[email protected]>
Manta plasma now has no splash damage, reverted Raptor to be able to hurt
itself (can do in UT3 if you try hard enough), and made the Scorpion a bit
more lenient with when it allows you to boost.
Truer to the original. Also, it flies now. That's a bug, not intentional,
but I'm not too sure how to solve it...

Signed-off-by: GreatEmerald <[email protected]>
For now it's to my liking.

Signed-off-by: GreatEmerald <[email protected]>
@Unre-Alex
Copy link
Contributor

The dust effect stays after you exit the vehicle, and it should be a little faster, especially when cloaked. Is there a reason why it doesn't rotate its arm 90 degrees?

Copy link
Owner

@GreatEmerald GreatEmerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some style comments, however.

WeaponClass=class'UT3Weap_NightshadeBeam';

bDetonatesGoop=true
bCausesBlood=false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need tabs to spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

God damnit, need to check my editor settings!

* Copyright � 2012 100GPing100
* Copyright � 2014 GreatEmerald
* Copyright � 2012, 2017, 2018 Luís 'zeluisping' Guimarães (100GPing100)
* Copyright � 2014 GreatEmerald
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copyright symbols got messed up. Make sure all files are in UTF-8 encoding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird because that's exactly how it shows in my editor and encoding is set to UTF-8, I even changed to it manually. Gotta figure out what's happening here, thanks for pointing this out!




simulated function Destroyed() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try to keep the style consistent with UT2004, i.e. every { should be on its own line and indents are four spaces rather than a tab.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry on this one, habit kicked in on this one!


if (ArmMine != none) {
ArmMine.Destroy();
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces for single lines are not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another habit, will change! Think I may have some more that can be removed

@@ -156,7 +174,7 @@ function bool NoObstacle()
else
return false;
}
/* � Type:
/* � Type:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This character got messed up too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's weird, didn't even know this character was special

if (ShoulderRotation.Yaw <= 32768 && ShoulderRotation.Yaw > 8192) {
ShoulderRotation.Yaw = 8192;
} else if (ShoulderRotation.Yaw > 32768 && ShoulderRotation.Yaw < 57344) {
ShoulderRotation.Yaw = 57344;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like the Clamp functions should be able to handle this with less text.

Copy link
Contributor Author

@zeluisping zeluisping Jan 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing here is that the clamp value depends on which half of the unit circle the angle is on:
image
Anything on blue needs to be clamped to 8192 (45º) and anythin on purple needs to be clamped to 57344 (315º).

The only other way I could think of would be to add 8192 (45º) to the angle, this would give me a clamp range from 0 to 16384 ( to 90º), then after clamping I'd remove the added 8192 (45º). For clarity I left the if approach, but I'd gladly do it this way, in fact I prefer it way more and I can leave a comment of some sort to explain it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, that would work. Though now we know that the clamping needs to happen at 16k and 48k.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll be changing that too!

break;
default:
// crash
break;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no other states, so this will never be run. Instead, you should make VS_Undeployed and VS_Cloaked the default, that will save some lines of code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

}
}
function Cloak(bool OnOff)
{
function Cloak(bool OnOff) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Booleans should be prefixed with b and always be positive. In this case it would make sense to call it bCloak.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but now I feel stupid for not having renamed this variable xD

{
local int i;

if (OnOff == true) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using == true is useless and just wastes a CPU cycle, simply remove that part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, force of habit, will change!

* Copyright � 2012 100GPing100
* Copyright � 2014 GreatEmerald
* Copyright � 2012, 2017, 2018 Luís 'zeluisping' Guimarães (100GPing100)
* Copyright � 2014 GreatEmerald
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, check the encoding

@zeluisping
Copy link
Contributor Author

@Unre-Alex The angle the arm rotates at is clamped to 45º, I used this value from memory thinking it was what happens in UT3, so you say it's 90º? Confirm this for me please and I'll fix it.

Thank you for spotting the dust effects not being destroyed when leaving the vehicle, completely forgot to take care of that!

Regarding the movement speed, the speed while cloaked is a percentage of the speed when not cloaked (just like in UT3 and using the same percentage) so what we can change is the uncloaked speed which will also affect the cloaked speed. Unfortunately I can't fix this one without getting values from you guys, maybe a discussion on #10 or even a different pull request?

@HellDragon-HK
Copy link
Contributor

Haven't tried this yet or even really touched the Necris vehicles but the arm is able to move this far in UT3 100GP if you need visual confirmation which can move by mouse or keyboard
screenshot00000
screenshot00001ns

@GreatEmerald
Copy link
Owner

The speed values are here:
http://greatemerald.xmpcommunity.com/uncodex/UT3-15/Source_utgame/utvehicle_nightshade.html#62

We've determined that they should match between UT3 and UT2004.

@zeluisping
Copy link
Contributor Author

@HellDragon-HK You can move it with the keyboard? How exactly? 😮 Maybe this can be implemented too (together with the camera constraint that should be implemented at some point). Thank you for the visual confirmations, but it's not really necessary, I trust your word, just need to know if it's confirmed! Thank you!

@HellDragon-HK
Copy link
Contributor

HellDragon-HK commented Jan 2, 2018

That's odd I distinctly remember Forward and Backward keys moving it and it doesn't now, I'm positive I did it that way (Backward moved it left and Forward moved it right) because mouse movement is harder and not as quick but I haven't played since right after the Titan Pack came out and there are a lot of oddities since the Game Spy patch I'm noticing I don't remember

One of those oddities I mentioned is that it likes to almost always spawn me as an Iron Guard Male (which I never use male characters) and none of my keys are what I set them to, I don't use turn left and right I use strafe left and right for example

@Unre-Alex
Copy link
Contributor

@100GPing100 Well, as you can see HellDragon confirmed that the arm rotates 90 degrees, I thought there was some issue you couldn't make it work. In UT3, you can rotate it with a mouse or 'turn left' and 'turn right' keys (not strafe keys), which works now in UT2004.

The speed values match UT3? I feel like it's noticeably slower in UT2004. Do you want me to mess with the speed and tell you what I feel is right or do we stay with the current values?

@GreatEmerald
Copy link
Owner

Unless you can find a good enough explanation for why the values should be different, they need to stay as in UT3. They might be modified by the code somewhere, but that means the code needs to be changed to do the same modifications, not the values.

@HellDragon-HK
Copy link
Contributor

It's probably not the speed by itself, it's probably in the damping and maxthrust

Also I think I understand why GP thought it turned less, with the mouse it's hard to get it to move as far as it actually can, and it normally only wants to move within what he thought it was

@Unre-Alex
Copy link
Contributor

@100GPing100 Two more issues. You can't switch between mines when undeployed and there shouldn't be a shadow when cloaked.

@zeluisping
Copy link
Contributor Author

zeluisping commented Jan 3, 2018

@Unre-Alex

You can't switch between mines when undeployed

This means we should be able to select mines while undeployed (cloaked and not cloaked but not while deploying/undeploying) or it means we currently can and shouldn't?

@GreatEmerald @HellDragon-HK Since this is a hover vehicle, HellDragon is right and the feeling @Unre-Alex has is valid; most likely what needs to be changed here is the thrust, GroundSpeed, AirSpeed and the KarmaParams's KMaxSpeed should limit the maximum speed properly.

@Unre-Alex
Copy link
Contributor

Unre-Alex commented Jan 3, 2018

@100GPing100

You don't have UT3 installed right?

This means we should be able to select mines while undeployed (cloaked and not cloaked

Yes, it worked before this patch.

but not while deploying/undeploying)

In UT3 you can select mines while undeploying, and you only can't while deploying.

Also,

The vehicle shouldn't be able to deploy while moving. In UT3 you got the message "Cannot deploy while moving.", you can deploy while moving when cloaked tho (you have the deploy icon all the time).

In UT3 you can deploy while on water (even deep water that would cover the vehicle), it only doesn't let you release the slow field.

@zeluisping
Copy link
Contributor Author

@Unre-Alex Yeah, no UT3 installed because the machine I work on is Linux (and if there is UT3 for linux the specs on this machine aren't enough for that).

That's a lot of useful info! Will take care of applying all that, thank you!

@GreatEmerald
Copy link
Owner

Indeed, UT3 was never released on Linux, so it would only work through Wine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants