/* http://www.irizone.net - plugin 3dsettings */ /* by iri - septembre 2004 */ typeof class = S;; var NbPluginInstance = 0;; fun out(o, cli)= C3DremRegisteredCli cli; /* désenregistre le client auprès du srv C3D3 */ 0 ;; fun cbcomm(ui, cli, action, param)= if !strcmp action "register" then if (C3DaddRegisteredCli cli) then /* enregistre le client auprès du srv C3D3 (1 si ok, 0 sinon) */ UsendMessage ui cli "registered" nil else _DMSevent this cli strcat class ".notRegistered" nil nil else if !strcmp action "changeBox" then (_RSregister this param RSfile|RScontrol param; /* nouvelle boite de collision */ UsendMessage ui cli "boxRegistered" param) else 0;; fun newOb(o)= if NbPluginInstance == 0 then ( UcbComm this ObUi o @cbcomm; OB_CBclientDestroyed o @out; set NbPluginInstance = NbPluginInstance + 1 ) else ( _DLGMessageBox _channel nil "Warning" " Too many Login instanced.\nOnly one instance per C3d module instance is possible.\nOnly the first instance will be used." 0; set NbPluginInstance = NbPluginInstance + 1 ); 0;; /* file -> S */ fun IniPlug(file)= set class = getInfo strextr _getpack _checkpack file "name"; PlugRegister class @newOb nil; 0 ;;