conversion error on index_from_pointer

Please post any questions about developing your plugin here. Please use the search function before posting!
Jezza
Junior Member
Posts: 16
Joined: Tue Aug 28, 2012 5:52 pm

Re: conversion error on index_from_pointer

Postby Jezza » Wed Dec 01, 2021 7:33 am

L'In20Cible wrote:I was not able to reproduce:
I was expecting that, but yeah... gc.collect() used to work for me too, but for some reason it doesn't work properly sometimes, which is a mystery.
L'In20Cible wrote:Perhaps we could add a separate class for that, but as far as the current class is concerned, I think we should leave it as is because it is consistent with the engine. Adding a separate class seems easy enough if we use a shared abstract base class.
I don't know the implementation of IPhysicsObjectPairHash, so I can't say for sure, but why can't it be something like a regular two-dimensional array?
If we only refer to networked entities, I think that would be more efficient.
User avatar
L'In20Cible
Project Leader
Posts: 1483
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: conversion error on index_from_pointer

Postby L'In20Cible » Wed Dec 01, 2021 7:46 am

Jezza wrote:I don't know the implementation of IPhysicsObjectPairHash, so I can't say for sure, but why can't it be something like a regular two-dimensional array?
If we only refer to networked entities, I think that would be more efficient.

The physics engine internally uses that for that very purpose (g_EntityCollisionHash), so I think it is appropriate to re-use engine tools here. I've added an abstract base earlier, so feel free to make a PR with a class that inherit from ICollisionHash which respect the order, etc. It could be named OrderedCollisionHash, unless you have a better idea.
User avatar
velocity
Senior Member
Posts: 218
Joined: Sat May 10, 2014 6:17 pm

Re: conversion error on index_from_pointer

Postby velocity » Fri Dec 03, 2021 12:10 pm

Haven't tested CollisionHash, but I can confirm OnEntityCollision works. Very nice!

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 1 guest