Skip to content
Snippets Groups Projects
Commit 19bd6cd6 authored by Hobnob's avatar Hobnob
Browse files

Merge branch 'gravity-fixes-fix' into 'master'

Movetype change should affect admins as well as non-admins

See merge request Hob-Co/spacecombat2-ce!22
parents b9273780 45d2f135
No related merge requests found
......@@ -200,24 +200,24 @@ function C:updateEntity( e )
if self:GetGravity() > 0.01 then
--Walk when in a life supported ship
if not self:GetNoclip(e) and e:GetMoveType() ~= MOVETYPE_WALK then
if not (self:GetNoclip(e) and e:GetMoveType() == MOVETYPE_NOCLIP) and e:GetMoveType() ~= MOVETYPE_WALK then
e:SetMoveType(MOVETYPE_WALK)
end
--Walk when in a planet and not noclipping
if self:GetNoclip(e) and e:GetMoveType() ~= MOVETYPE_WALK and e:GetMoveType() ~= MOVETYPE_NOCLIP then
if (self:GetNoclip(e) and e:GetMoveType() == MOVETYPE_NOCLIP) and e:GetMoveType() ~= MOVETYPE_WALK and e:GetMoveType() ~= MOVETYPE_NOCLIP then
e:SetMoveType(MOVETYPE_WALK)
end
else
--Fly if in space (helps with clientside prediction)
if not self:GetNoclip(e) and e:GetMoveType() ~= MOVETYPE_FLY then
if not (self:GetNoclip(e) and e:GetMoveType() == MOVETYPE_NOCLIP) and e:GetMoveType() ~= MOVETYPE_FLY then
e:SetMoveType(MOVETYPE_FLY)
end
--Walk if we have some gravity or on a planet
if (e.HasGravityOverride or self:GetNoclip(e)) and e:GetMoveType() ~= MOVETYPE_WALK and e:GetMoveType() ~= MOVETYPE_NOCLIP then
if (e.HasGravityOverride or (self:GetNoclip(e) and e:GetMoveType() == MOVETYPE_NOCLIP)) and e:GetMoveType() ~= MOVETYPE_WALK and e:GetMoveType() ~= MOVETYPE_NOCLIP then
e:SetMoveType(MOVETYPE_WALK)
end
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment