or some background info might be appropiate:
making a small version of pong to test out my skills etc etc. using vb.net and irrlicht v1.0
got a curious bug where if the mouse cursor is precisly 27 pixels from the top of the screen (ie Irrlicht.Event.MousePos.Y = 27) then the program crashs without so much as a "yer screwed buddy" error message.
though a wee bit of testing ive narrowed it down to the IEventReceiver (first i though might be a math problem somewhere or summit like that) so i present to you, in all its problematic glory the IEventReceiver implementing class of my wee project:
Code: Select all
Public Class kevent
Implements IEventReceiver
Public mousex As Single
Public mousey As Single
Public check As Boolean = False
Public Sub New()
device.EventReceiver = Me
End Sub
Public Function OnEvent(ByVal e As Irrlicht.Event) As Boolean Implements Irrlicht.IEventReceiver.OnEvent
Select Case e.Key
Case KeyCode.KEY_ESCAPE
Module1.device.CloseDevice()
End
End Select
If e.MouseInputType = MouseInputEvent.PressedDownLeft Then
go = True
End If
If check = False Then
mousex = e.MousePos.X
mousey = e.MousePos.Y
Else
'set mouse position here
End If
Return False
End Function
End Class
Code: Select all
Private kevent As New kevent
also removing those that call anything from this class still doesnt remove the problem, im thinking maybe a bug in the IEventReceiver, but of course i dont have a clue in hell whats wrong
edit: scratch that: removing ALL the calls to it does fix it, ie tis the Private kevent As New kevent thats causing the problem (well starting the problem, its just calling it correct?)