From: Mario Date: Sun, 16 Nov 2014 13:14:49 +0000 (+1100) Subject: Merge branch 'div0-stable' into nitroxis/irc X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=60415c47de8b907b3eb9959cce58fcbb14db5d93;p=xonotic%2Fdarkplaces.git Merge branch 'div0-stable' into nitroxis/irc Conflicts: dpdefs/menudefs.qc prvm_cmds.c prvm_cmds.h --- 60415c47de8b907b3eb9959cce58fcbb14db5d93 diff --cc .DS_Store index 00000000,00000000..980d0f5c new file mode 100644 Binary files differ diff --cc dpdefs/menudefs.qc index 46e7fe97,cb7ef55a..a9e55d52 --- a/dpdefs/menudefs.qc +++ b/dpdefs/menudefs.qc @@@ -530,11 -530,12 +530,17 @@@ float FIELD_FUNCTION = 6 //getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned. //putentityfieldstring puts the data returned by getentityfieldstring back into the entity. +//IRC +void irc_connect() = #550; +void irc_disconnect() = #551; +void irc_write(string line) = #552; + + //DP_COVERAGE + //idea: divVerent + //darkplaces implementation: divVerent + //function definitions: + void coverage() = #642; // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called. + // assorted undocumented extensions string(string, float) netaddress_resolve = #625; string(string search, string replace, string subject) strreplace = #484; diff --cc prvm_cmds.c index f8366039,187930b2..da7e4fcf --- a/prvm_cmds.c +++ b/prvm_cmds.c @@@ -7342,21 -7342,10 +7343,28 @@@ void VM_physics_addtorque(prvm_prog_t * VM_physics_ApplyCmd(ed, &f); } - +void VM_irc_connect(prvm_prog_t *prog) +{ + IRC_Connect(); +} + +void VM_irc_disconnect(prvm_prog_t *prog) +{ + IRC_Disconnect(); +} + +void VM_irc_write(prvm_prog_t *prog) +{ + char string[VM_STRINGTEMP_LENGTH]; + + VM_VarString(prog, 0, string, sizeof(string)); + IRC_AddMessage(string); - } ++} ++ + extern cvar_t prvm_coverage; + void VM_coverage(prvm_prog_t *prog) + { + VM_SAFEPARMCOUNT(0, VM_coverage); + if (prog->explicit_profile[prog->xstatement]++ == 0 && (prvm_coverage.integer & 2)) + PRVM_ExplicitCoverageEvent(prog, prog->xfunction, prog->xstatement); + } diff --cc prvm_cmds.h index 143319a7,708a3621..60b930ce --- a/prvm_cmds.h +++ b/prvm_cmds.h @@@ -484,8 -488,6 +488,11 @@@ void VM_physics_enable(prvm_prog_t *pro void VM_physics_addforce(prvm_prog_t *prog); void VM_physics_addtorque(prvm_prog_t *prog); +// irc +void VM_irc_connect(prvm_prog_t *prog); +void VM_irc_disconnect(prvm_prog_t *prog); +void VM_irc_write(prvm_prog_t *prog); ++ + void VM_coverage(prvm_prog_t *prog); + #endif