gel: Only send motion updates for sprites if they have moved.

This commit is contained in:
Rod Kay
2023-12-13 17:48:42 +11:00
parent 80dab00932
commit bcd283c6d6
13 changed files with 186 additions and 77 deletions

View File

@@ -1098,6 +1098,33 @@ is
-----------------
-- Motion Updates
--
function has_Moved (Self : in out Item; current_Site : Vector_3;
current_Spin : Matrix_3x3) return Boolean
is
Result : Boolean := False;
begin
if current_Site /= Self.prior_Site
then
Self.prior_Site := current_Site;
Result := True;
end if;
if current_Spin /= Self.prior_Spin
then
Self.prior_Spin := current_Spin;
Result := True;
end if;
return Result;
end has_Moved;
------------
--- Graphics
--