Skip to content

Conversation

@zaquest
Copy link
Member

@zaquest zaquest commented Sep 29, 2017

Most of the #221 comes from engine checking for collision surfaces that are occluded by it's neighbours. While in theory it doesn't seem feasable to eliminate all such cases, the combination of excluding fully occluded surfaces from collision detection and increasing rounding error margin fixes all the cases I've been able to find or construct.

GENFACEVERTSXY(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
GENFACEVERTSZ(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1)

bool collidesolidface(const cube &c, const int orient, const ivec &co, const int size);
Copy link
Member

Choose a reason for hiding this comment

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

Should probably be extern

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it a code style thing? Otherwise there's no difference AFAIK.

Copy link
Contributor

@TheAssassin TheAssassin Sep 30, 2017

Choose a reason for hiding this comment

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

It's a linker thing, extern explicitly makes the function explicitly public. Even if it doesn't make an explicit difference linking the Red Eclipse binaries, it is more explicit to put extern there. So, yes, a code style thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Top level functions have external linkage by default, so it makes no difference. It seems to be a convention in Cube 2 to mark them explicitly extern in header files.

@acerspyro
Copy link
Contributor

Looks fine to me. @qreeves @lsalzman please review.

@qreeves qreeves closed this Dec 5, 2017
@zaquest zaquest deleted the clip branch December 5, 2017 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants