Skip to content

Conversation

@James-Frowen
Copy link
Member

No description provided.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug B 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@dragonslaya84 dragonslaya84 added the keep-open Stops issue being closed because it is stale label Jan 22, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Comment on lines +219 to +223
float fx = position.x - Offset.x;
float fy = position.y - Offset.y;

x = Mathf.RoundToInt(fx / GridSize.x);
y = Mathf.RoundToInt(fy / GridSize.y);
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently bugged near edge, might need extra offset of GridSize/2 or something.

Unit tests would be good for this function.

/// <returns>True if the player can see this object.</returns>
public override bool OnCheckObserver(INetworkPlayer player)
{
ThrowIfNoSystem();
Copy link
Member Author

Choose a reason for hiding this comment

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

should return and wait for system instead of throw. System can rebuild existing NI when it starts.

This is to better deal with spawning objects inside server.Started, the system might not be first in even list

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

Labels

keep-open Stops issue being closed because it is stale Needs testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants