Skip to content
Browse files

Merge pull request #117 from xToken/Dev

Dev
  • Loading branch information...
2 parents a938658 + 9e2704e commit c102b49bd952b8368091db69812ce80d967569a8 Matt committed Oct 7, 2012
View
2 Readme.txt
@@ -1,4 +1,4 @@
For Servers
add -mods 5f7771c to your server command line variables, and rename the ns2c folder to
-m5f7771c_1349643439. Then place that folder in the location set with the -modstorage command
+m5f7771c_1349656869. Then place that folder in the location set with the -modstorage command
line argument.
View
4 lua/Balance.lua
@@ -307,8 +307,8 @@ kSwipeDamageType = kDamageType.Normal
kSwipeEnergyCost = 6.5
kSwipeDelay = 0.48
-kStartBlinkEnergyCost = 8
-kBlinkEnergyCost = 100
+kStartBlinkEnergyCost = 10
+kBlinkEnergyCost = 60
kMetabolizeEnergyCost = 25
kMetabolizeEnergyGain = 35
View
59 lua/Fade.lua
@@ -49,10 +49,7 @@ Fade.kAcceleration = 50
Fade.kAirAcceleration = 25
Fade.kBlinkAirAcceleration = 40
Fade.kBlinkAirAccelerationDuration = 2
-Fade.kBlinkAcceleration = 50
-Fade.kVerticleBlinkAcceleration = 150
-Fade.kViewDeadZone = 0.15
-Fade.kReversalThreshold = 0.3
+Fade.kBlinkAcceleration = 20
if Server then
Script.Load("lua/Fade_Server.lua")
@@ -236,35 +233,8 @@ function Fade:GetMaxSpeed(possible)
end
-function Fade:ModifyVelocity(input, velocity)
-
+function Fade:ModifyVelocity(input, velocity)
Alien.ModifyVelocity(self, input, velocity)
-
- if self:GetIsBlinking() then
-
- self:PerformMovement( velocity * input.time, 1, velocity )
- local viewCoords = self:GetViewAngles():GetCoords()
- local zAxis = viewCoords.zAxis
- local upangle = math.abs(zAxis.y)
-
- self.onGroundNeedsUpdate = true
- if self:GetIsOnGround() and velocity.y < 4 then
- velocity.y = velocity.y + math.sqrt(math.abs(2 * self:GetJumpHeight() * self:GetGravityForce(input)))
- else
- //Convert velocity instantly if opposite direction for additional responsiveness
- if upangle > Fade.kViewDeadZone then
- if upangle > Fade.kReversalThreshold and Sign(velocity.y) ~= Sign(zAxis.y) then
- if Sign(zAxis.y) > 0 and velocity.y < 0 then
- velocity.y = 10
- elseif Sign(zAxis.y) < 0 and velocity.y > 0 then
- velocity.y = 0
- end
- end
- velocity.y = velocity.y + (Fade.kVerticleBlinkAcceleration * ((1 - math.cos(zAxis.y)) * input.time))
- end
- end
- end
-
end
function Fade:GetMass()
@@ -283,6 +253,10 @@ function Fade:GetRecentlyBlinked()
return Shared.GetTime() - self.etherealEndTime < Fade.kBlinkAirAccelerationDuration
end
+function Fade:GetBlinkCooldown()
+ return Shared.GetTime() - self.etherealEndTime < Blink.kMinEnterEtherealTime
+end
+
function Fade:GetRecentlyJumped()
return self.timeOfLastJump ~= nil and self.timeOfLastJump + 0.2 > Shared.GetTime()
end
@@ -311,21 +285,30 @@ function Fade:GetGravityAllowed()
return true
end
-function Fade:TriggerBlink()
+function Fade:OnBlink()
self.ethereal = true
self.onGroundNeedsUpdate = false
self.onGround = false
self.jumping = true
end
+function Fade:OnBlinking(input)
+
+ self.onGroundNeedsUpdate = true
+ local newVelocity = self:GetViewCoords().zAxis * Fade.kBlinkAcceleration * input.time
+ local velocity = self:GetVelocity()
+
+ if self:GetIsOnGround() and velocity.y < 4 then
+ newVelocity.y = newVelocity.y + math.sqrt(math.abs(2 * self:GetJumpHeight() * self:GetGravityForce(input)))
+ end
+
+ self:SetVelocity(velocity + newVelocity)
+
+end
+
function Fade:OverrideInput(input)
Player.OverrideInput(self, input)
-
- if self:GetIsBlinking() then
- input.move.z = 1
- input.move.x = 0
- end
return input
View
8 lua/Marine.lua
@@ -703,11 +703,11 @@ function Marine:Drop(weapon, ignoreDropTimeLimit, ignoreReplacementWeapon)
if Server then
- if ignoreReplacementWeapon ~= true and weapon.GetReplacementWeaponMapName then
- self:GiveItem(weapon:GetReplacementWeaponMapName(), false)
+ //if ignoreReplacementWeapon ~= true and weapon.GetReplacementWeaponMapName then
+ //self:GiveItem(weapon:GetReplacementWeaponMapName(), false)
// the client expects the next weapon is going to be selected (does not know about the replacement).
- self:SelectNextWeaponInDirection(1)
- end
+ //self:SelectNextWeaponInDirection(1)
+ //end
end
View
19 lua/Marine_Client.lua
@@ -349,25 +349,6 @@ function Marine:UpdateMisc(input)
end
-// Give dynamic camera motion to the player
-/*
-function Marine:PlayerCameraCoordsAdjustment(cameraCoords)
-
- if self:GetIsFirstPerson() then
-
- if self:GetIsStunned() then
- local attachPointOffset = self:GetAttachPointOrigin("Head") - cameraCoords.origin
- attachPointOffset.x = attachPointOffset.x * .5
- attachPointOffset.z = attachPointOffset.z * .5
- cameraCoords.origin = cameraCoords.origin + attachPointOffset
- end
-
- end
-
- return cameraCoords
-
-end*/
-
function Marine:OnCountDown()
Player.OnCountDown(self)
View
12 lua/Marine_Server.lua
@@ -225,6 +225,18 @@ function Marine:GiveItem(itemMapName)
end
+ if itemMapName == Welder.kMapName then
+
+ local hgWeapon = self:GetWeapon(HandGrenades.kMapName)
+
+ if hgWeapon then
+ self:RemoveWeapon(hgWeapon)
+ DestroyEntity(hgWeapon)
+ continue = true
+ end
+
+ end
+
if continue == true then
return Player.GiveItem(self, itemMapName, setActive)
end
View
2 lua/NS2Utility.lua
@@ -1105,7 +1105,7 @@ function SetPlayerPoseParameters(player, viewModel)
viewModel:SetPoseParam("crouch", player:GetCrouchAmount())
viewModel:SetPoseParam("body_yaw", bodyYaw)
viewModel:SetPoseParam("body_yaw_run", bodyYawRun)
- viewModel:SetPoseParam("land_intensity", landIntensity)
+ viewModel:SetPoseParam("land_intensity", 0)
end
View
2 lua/Onos.lua
@@ -53,7 +53,7 @@ Onos.kHealth = kOnosHealth
Onos.kArmor = kOnosArmor
Onos.kChargeEnergyCost = 60
Onos.kChargeAcceleration = 120
-Onos.kChargeUpDuration = .25
+Onos.kChargeUpDuration = .35
Onos.kChargeDelay = .1
Onos.kMinChargeDamage = kChargeMinDamage
Onos.kMaxChargeDamage = kChargeMaxDamage
View
2 lua/Player_Client.lua
@@ -2135,8 +2135,6 @@ function Player:GetCameraViewCoordsOverride(cameraCoords)
cameraCoords = angles:GetCoords(origin)
end
-
- cameraCoords = self:PlayerCameraCoordsAdjustment(cameraCoords)
end
View
2 lua/PlayingTeam.lua
@@ -821,7 +821,7 @@ function PlayingTeam:GetPresRecipientCount()
for i, playerId in ipairs(self.playerIds) do
local player = Shared.GetEntity(playerId)
- if player and player:GetResources() < kMaxPersonalResources and player:GetIsAlive() then
+ if player and player:GetResources() < kMaxPersonalResources then
recipientCount = recipientCount + 1
end
View
50 lua/Skulk_Client.lua
@@ -27,57 +27,9 @@ end
function Skulk:UpdateMisc(input)
Alien.UpdateMisc(self, input)
-
- if self.currentCameraRoll == nil then
- self.currentCameraRoll = 0
- end
- if self.goalCameraRoll == nil then
- self.goalCameraRoll = 0
- end
-
- //self.currentCameraRoll = LerpGeneric(self.currentCameraRoll, self.goalCameraRoll, math.min(1, input.time * Skulk.kCameraRollSpeedModifier))
end
function Skulk:GetHeadAttachpointName()
return "Bone_Tongue"
-end
-
-local gEnableTilt = true
-// Tilt the camera based on the wall the Skulk is attached to.
-function Skulk:PlayerCameraCoordsAdjustment(cameraCoords)
-
- if self.wallWalkingNormalCurrent and gEnableTilt then
-
- local viewModelTiltAngles = Angles()
- viewModelTiltAngles:BuildFromCoords(cameraCoords)
- // Don't rotate if too close to upside down (on ceiling).
- if math.abs(self.wallWalkingNormalCurrent:DotProduct(Vector.yAxis)) > 0.9 then
- self.goalCameraRoll = 0
- else
- local wallWalkingNormalCoords = Coords.GetLookIn( Vector.origin, cameraCoords.zAxis, self.wallWalkingNormalCurrent )
- local wallWalkingRoll = Angles()
- wallWalkingRoll:BuildFromCoords(wallWalkingNormalCoords)
- wallWalkingRoll = wallWalkingRoll.roll
- self.goalCameraRoll = (wallWalkingRoll * Skulk.kCameraRollTiltModifier)
- end
- if self.currentCameraRoll then
- viewModelTiltAngles.roll = viewModelTiltAngles.roll + self.currentCameraRoll
- end
- local viewModelTiltCoords = viewModelTiltAngles:GetCoords()
- viewModelTiltCoords.origin = cameraCoords.origin
- return viewModelTiltCoords
-
- end
-
- return cameraCoords
-
-end
-
-function OnCommandSkulkViewTilt(enableTilt)
-
- gEnableTilt = enableTilt ~= "false"
-
-end
-
-Event.Hook("Console_skulk_view_tilt", OnCommandSkulkViewTilt)
+end
View
22 lua/Weapons/Alien/Blink.lua
@@ -14,8 +14,8 @@ Script.Load("lua/Weapons/Alien/Ability.lua")
class 'Blink' (Ability)
Blink.kMapName = "blink"
-// initial force added when starting blink
-local kEtherealForce = 10
+local kEtherealForce = 8
+Blink.kMinEnterEtherealTime = 0.1
local networkVars =
{
@@ -78,8 +78,9 @@ end
function Blink:OnSecondaryAttack(player)
+ local minTimePassed = not player:GetBlinkCooldown()
local hasEnoughEnergy = player:GetEnergy() > kStartBlinkEnergyCost
- if hasEnoughEnergy and self:GetBlinkAllowed() then
+ if hasEnoughEnergy and self:GetBlinkAllowed() and minTimePassed then
// Enter "ether" fast movement mode, but don't keep going ethereal when button still held down after
// running out of energy
@@ -89,6 +90,8 @@ function Blink:OnSecondaryAttack(player)
self.timeBlinkStarted = Shared.GetTime()
self.blinkButtonDown = true
+ local newVelocity = player:GetViewCoords().zAxis * kEtherealForce
+ player:SetVelocity(player:GetVelocity() + newVelocity)
end
end
@@ -123,7 +126,6 @@ function Blink:SetEthereal(player, state)
end
player.ethereal = state
- //player:SetGravityEnabled(not player.ethereal)
player:SetEthereal(state)
@@ -132,7 +134,7 @@ function Blink:SetEthereal(player, state)
// Deduct blink start energy amount.
player:DeductAbilityEnergy(kStartBlinkEnergyCost)
- player:TriggerBlink()
+ player:OnBlink()
else
@@ -148,16 +150,10 @@ function Blink:ProcessMoveOnWeapon(player, input)
if self:GetIsActive() and player.ethereal then
- // Decrease energy while in blink mode
- // Don't deduct energy for blink for a short time to make sure that when we blink
- // we always get at least a short blink out of it
- if Shared.GetTime() > (self.timeBlinkStarted + .08) then
-
+ player:OnBlinking(input)
local energyCost = input.time * kBlinkEnergyCost
player:DeductAbilityEnergy(energyCost)
-
- end
-
+
end
// End blink mode if out of energy
View
4 lua/Weapons/Marine/Welder.lua
@@ -208,6 +208,10 @@ function Welder:GetRange()
return kWeldRange
end
+function Welder:GetReplacementWeaponMapName()
+ return HandGrenades.kMapName
+end
+
// repair rate increases over time
function Welder:GetRepairRate(repairedEntity)
View
3 lua/ns2.deproj
@@ -481,6 +481,9 @@
<filename>Observatory.lua</filename>
</file>
<file>
+ <filename>Onos.lua</filename>
+ </file>
+ <file>
<filename>Onos_Client.lua</filename>
</file>
<file>
View
4 lua/plugins/plugin_voterandom.lua
@@ -129,7 +129,9 @@ if kDAKConfig and kDAKConfig.VoteRandom and kDAKConfig.VoteRandom.kEnabled then
table.insert(kDAKOnTeamJoin, function(player, newTeamNumber, force) return VoteRandomJoinTeam(player, newTeamNumber, force) end)
function VoteRandomEndGame(winningTeam)
- RandomRoundRecentlyEnded = Shared.GetTime()
+ if kVoteRandomTeamsEnabled then
+ RandomRoundRecentlyEnded = Shared.GetTime()
+ end
end
table.insert(kDAKOnGameEnd, function(winningTeam) return VoteRandomEndGame(winningTeam) end)

0 comments on commit c102b49

Please sign in to comment.
Something went wrong with that request. Please try again.